Saving a file RRS feed

  • Question

  • So I created .txt file using System.IO namespace and it all works, but I want to make a code to create and SAVE that .txt file. I mean I edit that file with my C# program but whatever I write it would be saved when I open that file and click save. So I want to add code which would be saving automaticaly that file.

    Sunday, June 9, 2019 9:25 AM


  • Hello,

    Have you tried using File.WriteAllLines or File.WriteAllText?

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    profile for Karen Payne on Stack Exchange

    • Marked as answer by denistalovic Sunday, June 9, 2019 9:54 AM
    Sunday, June 9, 2019 9:37 AM