title: Parsing a value from string to an unknown variable type
body: <p>For a game I'm developing on (in C#), we need to be able to save and load options files, and for ease of use, we decided to do it as plain text.
  I have a problem however when I try to load the text back into their variables as I don't always know what type of variable it needs to be loaded into.</p>
  
  <p>The following line of code works, except for the fact that I have yet to find functionallity that resembles</p>
  
  <pre><code>f.GetType().Parse()
  </code></pre>
  
  <p>Heres the actual code</p>
  
  <pre><code>OptionsClass current = new OptionsClass();  
      using(StreamReader reader = new StreamReader(path)){
          string line;
          while((line = reader.ReadLine()) != null){
          foreach(FieldInfo f in typeof(OptionsClass).GetFields()){
              f.SetValue(current, f.GetType().Parse(line.Split(new char[] {'='})[1]));
  
          }
      }
  }
  </code></pre>
  
  <p>Let me know if anything is unclear, or more information is needed.
  Regards,
  -Logan</p>