Answers for "c# loop through a string one line at a time"

C#
-1

for each line in string c#

using (var reader = new StringReader(multiLineString))
{
    for (string line = reader.ReadLine(); line != null; line = reader.ReadLine())
    {
        // Do something with the line
    }
}
Posted by: Guest on March-06-2020

Code answers related to "c# loop through a string one line at a time"

C# Answers by Framework

Browse Popular Code Answers by Language