Answers for "c# how to read multiple lines"

C#
4

read in multiple numbers c#

//Read line, and split it by whitespace into an array of strings
string[] tokens = Console.ReadLine().Split();

//Parse element 0
int a = int.Parse(tokens[0]);

//Parse element 1
int b = int.Parse(tokens[1]);
Posted by: Guest on January-16-2020
1

c# how many lines in methods

Methods should not have more than an average of 30 code lines (not counting
line spaces and comments).
Posted by: Guest on December-08-2021
1

c# read lines number 3 from string

string line = File.ReadLines(FileName).Skip(14).Take(1).First();
Posted by: Guest on December-12-2020

Code answers related to "c# how to read multiple lines"

C# Answers by Framework

Browse Popular Code Answers by Language