Skip to content

Tag Archives: CSharp-File-Handling

File.WriteAllLines(String, String[], Encoding) is an inbuilt File class method that is used to create a new file, writes the specified string array to the file… Read More
File.Replace(String, String, String, Boolean) is an inbuilt File class method that is used to replace the contents of a specified destination file with the contents… Read More
File.WriteAllBytes(String) is an inbuilt File class method that is used to create a new file then writes the specified byte array to the file and… Read More
File.SetAttributes(String, FileAttributes) is an inbuilt File class method that is used to set the specified file attributes of the file on the specified path. File… Read More
File.SetLastWriteTimeUtc(String) is an inbuilt File class method which is used to set the date and time, in coordinated universal time (UTC), that the specified file… Read More
File.GetAttributes(String) is an inbuilt File class method that is used to get the file attributes of the file on the path. File attributes are those… Read More
File.GetLastAccessTimeUtc(String) is an inbuilt File class method which is used to return the date and time, in coordinated universal time (UTC), that the specified file… Read More
File.GetLastAccessTime(String) is an inbuilt File class method which is used to return the date and time the specified file or directory was last accessed.Syntax:   public… Read More
File.OpenText(String) is an inbuilt File class method which is used to open an existing UTF-8 encoded text file for reading.Syntax:   public static System.IO.StreamReader OpenText (string… Read More
File.OpenWrite(String) is an inbuilt File class method that is used to open an existing file or creates a new file for writing. Syntax:  public static… Read More
File.OpenRead(String) is an inbuilt File class method which is used to open an existing file for reading.Syntax:   public static System.IO.FileStream OpenRead (string path); Parameter: This… Read More
File.Delete(String) is an inbuilt File class method which is used to delete the specified file.Syntax:   public static void Delete (string path); Parameter: This function accepts… Read More
File.CreateText() is an inbuilt File class method that is used to overwrite the contents of the existing file with the given UTF-8 encoded text and… Read More
File.AppendText() is an inbuilt File class method which is used to create a StreamWriter that appends UTF-8 encoded text to an existing file else it… Read More
File.SetLastAccessTimeUtc(String, DateTime) is an inbuilt File class method which is used to set the date and time, in coordinated universal time (UTC), that the specified… Read More