Search code examples
c#installationdir

Getting dir from .txt file


I want to get a install dir from .txt file to use it in c# Visual Studio 2015, how can i do this ?

I have an updater and i want that he going get a installation dir from a .txt file example: if in .txt file "c:\install\here\" then my updater going to download there files


Solution

  • string dir="";
    using(StreamReader sr=new StreamReader("FileToGetDirFrom.txt")
    {
      dir=sr.ReadLine();
    }