Write to a File in C#
In this article we will discuss about how to write to a File in C#.
The FileStream object is used
to write to a file. The Write method of FileStream can be used to write to a
file. It takes a byte array. The following code snippet creates a FileStream
object using the File.Open method that takes a file name as its first parameter
and then uses the Write method of the FileStream to write it the file.
(FileStream fs =
Byte info = new UTF8Encoding(true).GetBytes("Add