title: Execute code lines from a text file in C#
body: <p>I have a text file looks like:</p>
  
  <pre><code>AssembleComponent Motor = new AssembleComponent;
  AssembleComponent Shaft = new AssembleComponent;
  ......
  
  Motor.cost = 100;
  Motor.quantity = 100;
  Shaft.cost = 10;
  Shaft.quantity = 100;
  ......
  </code></pre>
  
  <p>I wish to execute these code lines in C#, so that I will have these Motor.cost, Motor.quantity, Shaft.cost, Shaft.quantity variables stored in the memory for later calculation.</p>
  
  <p>What can I do to achieve this?</p>