4D Linked list Text Editer using Winform

just-umair 1 Reputation point
2021-01-04T02:12:26.45+00:00

My task is to use a 4D linked list and display Linked List in Windows form and store data in a .txt file using file handling.
and how can I input my data in linked list because console .read is not available in winform
How can I display my linked list data in Winform and How can I use Cut Copy paste functions?

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,925 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Daniel Zhang-MSFT 9,641 Reputation points
    2021-01-05T03:16:19.573+00:00

    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.

    0 comments No comments

  2. rewat verma 0 Reputation points
    2024-11-01T13:27:05.49+00:00

    .dmvL:m

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.