Vidyalelo
C# Programming · Q29

File Handling and Input Output in C Sharp

Programming · C# Programming · question 29

Q29

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
Answer
C.
Reads the contents of a file into an array of bytes
D.
None of the above

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board