title: Save Variables from a .txt File on C#
body: <p>sorry I´m new with C# and working with Visual Studio. I´m trying to make a .txt with variables so later when I need to change for example a number o a path I can change it on the .txt file and don´t need to open the code and update.</p>
  
  <p>For example I have this archive.txt</p>
  
  <pre><code>Joe;Rodriguez;C:\example\hello.txt;398663
  </code></pre>
  
  <p>And this is my code:</p>
  
  <pre><code>class Program
  {
      static void Main(string[] args)
      {
          String[] split;
          StreamReader sr = File.OpenText(@"C:\folder\archive.txt");
          string line;
  
          while ((line = sr.ReadLine()) != null)
          {
              split = line.Split(new Char[] { ';' });
              string name = split[0];
              string lastname = split[1];
              string path = split[2];
              string num = split[3];
  
              Console.WriteLine("Split 0 is: " + name);
              Console.WriteLine("Split 2 is: " + lastname);
              Console.WriteLine("Split 3 is: " + path);
              Console.WriteLine("Split 4 is: " + num);
  
          }
      }
  
  }
  </code></pre>
  
  <p>What it does, is that each value saves on a variable so after I can use it on the code. It is getting the value after the sign "<strong>;</strong>"</p>
  
  <p><a href="https://i.stack.imgur.com/rt0Vr.jpg" rel="nofollow noreferrer">values get save on variables</a></p>
  
  <p>How can I save the variables if my .txt file is saved like this:</p>
  
  <p><a href="https://i.stack.imgur.com/ffklb.jpg" rel="nofollow noreferrer">.txt File</a></p>
  
  <p>At the begining the .txt Dile is in one line and separated by a "<strong>;</strong>" what I want to do is that the program only saves the value aftes the "<strong>= (space)</strong>" and not being a line but with an enter on each line.</p>
  
  <p>Is there a way?</p>
  
  <p>Thanks for your help in advanced.</p>