title: Can .NET load and parse a properties file equivalent to Java Properties class?
body: <p>Is there an easy way in C# to read a properties file that has each property on a separate line followed by an equals sign and the value, such as the following:</p>
  
  <pre><code>ServerName=prod-srv1
  Port=8888
  CustomProperty=Any value
  </code></pre>
  
  <p>In Java, the Properties class handles this parsing easily:</p>
  
  <pre><code>Properties myProperties=new Properties();
  FileInputStream fis = new FileInputStream (new File("CustomProps.properties"));
  myProperties.load(fis);
  System.out.println(myProperties.getProperty("ServerName"));
  System.out.println(myProperties.getProperty("CustomProperty"));
  </code></pre>
  
  <p>I can easily load the file in C# and parse each line, but is there a built in way to easily get a property without having to parse out the key name and equals sign myself?  The C# information I have found seems to always favor XML, but this is an existing file that I don't control and I would prefer to keep it in the existing format as it will require more time to get another team to change it to XML than parsing the existing file.</p>