Examveda

What is the purpose of the File.WriteAllText() method in C#?

A. Appends text to the end of a file

B. Writes the specified string to a file, overwriting the file if it already exists

C. Reads the contents of a file into an array of bytes

D. None of the above

Answer: Option B


Join The Discussion

Related Questions on File Handling and Input Output in C Sharp