Hi justumair-5182,
What is "4D Linked list" in your description?And do you want to use console in winform?
In order to better solve your problem, please provide some of your relevant code.
According to my understanding, you can change the Output type to Console Application in project property's page.
Then use StreamWriter to store your linked list data in a .txt file.
Here is simple code example:
private void Form1_Load(object sender, EventArgs e)
{
WriteToFile wr = new WriteToFile();
wr.Data();
Console.Read();
}
class WriteToFile
{
public void Data()
{
// This will create a file named sample.txt
// at the specified location
StreamWriter sw = new StreamWriter(@"C:\Users\Desktop\test.txt");
// To write on the console screen
Console.WriteLine("Enter the Text that you want to write on File");
// To read the input from the user
string str = Console.ReadLine();
// To write a line in buffer
sw.WriteLine(str);
// To write in output stream
sw.Flush();
// To close the stream
sw.Close();
}
}
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.