Skip to content

Tag Archives: CSharp-File-Handling

The FileStream is a class used for reading and writing files in C#. It is part of the System.IO namespace. To manipulate files using FileStream,… Read More
File.Replace(String, String, String) is an inbuilt File class method that is used to replace the contents of a specified destination file with the contents of… Read More
File.WriteAllText(String, String, Encoding) is an inbuilt File class method that is used to create a new file, writes the specified string to the file using… Read More
File.WriteAllText(String, String) is an inbuilt File class method that is used to create a new file, writes the specified string to the file, and then… Read More
File.ReadAllText(String, Encoding) is an inbuilt File class method that is used to open a text file then reads all the text in the file with… Read More
File.ReadAllText(String) is an inbuilt File class method that is used to open a text file then reads all the text in the file and then… Read More
File.ReadLines(String, Encoding) is an inbuilt File class method that is used to read the lines of a file that has a specified encoding. Syntax: public… Read More
File.ReadLines(String) is an inbuilt File class method that is used to read the lines of a file. Syntax: public static System.Collections.Generic.IEnumerable ReadLines (string path); Parameter:… Read More
File.ReadAllLines(String, Encoding) is an inbuilt File class method that is used to open a text file then reads all lines of the file into a… Read More
File.ReadAllLines(String) is an inbuilt File class method that is used to open a text file then reads all lines of the file into a string… Read More
File.Create(String, Int32, FileOptions, FileSecurity) is an inbuilt File class method which is used to overwrite an existing file, specifying a buffer size and options that… Read More
File.Create(String, Int32, FileOptions) is an inbuilt File class method that is used to overwrite an existing file, specifying a buffer size and options that describe… Read More
File.Create(String, Int32) is an inbuilt File class method which is used to overwrite an existing file, specifying a buffer size else create a new file… Read More
File.Create(String) is an inbuilt File class method which is used to overwrites an existing file else create a new file if the specified file is… Read More
File.AppendAllLines(String, IEnumerable<String>) is an inbuilt File class method which is used to append specified lines to a file and then closes the file. Syntax: public… Read More