What do you want to save?
Add Code snippet
New code examples
-
C# 2021-11-17 06:33:11
c# read from file line by line
int counter = 0; string line; // Read the file and display it line by line. System.IO.StreamReader file = new System.IO.StreamReader(@"c:\test.txt"); while((line = file.ReadLine()) != null) { System.Console.WriteLine(line)... Add solution -
C# 2021-11-15 09:39:38
how to read particular line of file in c#
int counter = 0; string line; // Read the file and display it line by line. System.IO.StreamReader file = new System.IO.StreamReader(@"c:\test.txt"); while((line = file.ReadLine()) != null) { System.Console.WriteLine(line)... Add solution -
C# 2021-11-12 20:47:14
c sharp how to read a text file
// To save the text as one string use 'ReadAllText()' string text = System.IO.File.ReadAllText(@"C:\filepath\file.txt"); // To save each line seperately in an array use 'ReadAllLines()' string[] lines = System.IO.File.ReadAllLines(@"C:\file... Add solution -
Python 2021-11-10 22:15:24
Random int without random module
def randint(a, b): "Return random integer in range [a, b], including both end points." return a + randbelow(b - a + 1) def randbelow(n): "Return a random int in the range [0,n). Raises ValueError if n<=0." k = n.bi... Add solution
Best helpers
Ranking is empty