Answers for "how to get the line number from text file in c#"

C#
0

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; 
}
Posted by: Guest on December-12-2020

Code answers related to "how to get the line number from text file in c#"

C# Answers by Framework

Browse Popular Code Answers by Language