FIle read specific line c# code example
Example 1: c# read lines number 3 from string
string line = File.ReadLines(FileName).Skip(14).Take(1).First();
Example 2: c# C# read text from a certain line number from string
string GetLine(string text, int lineNo)
{
string[] lines = text.Replace("\r","").Split('\n');
return lines.Length >= lineNo ? lines[lineNo-1] : null;
}