private void btnOpslaan_Click(object sender, EventArgs e)
{
}
First add System.IO namespace to the code.
using System.IO;
Then use this line:
File.WriteAllLines(@"c:\YourFileName.txt", yourList);
Creates a new file, writes a collection of strings to the file, and then closes the file.
Be careful, If the target file already exists, it will overwritten. If you want to append lines, try ' File.AppendAllLines ' method.
More about File.WriteAllLines
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.