Question: how to export data to text file in c#?
Answer: Initial chamber.
Step 1: Open Visual Studio 2010, Go to File, New, Projects, then under Visual C# select Windows. ... 
Design chamber.
Step 2: Now open your Form1. ... 
Form1.cs [design]:
Change the property of textbox - Multiline as True.
Code chamber. ... 
Form1.