title: Loading text from template file
body: <p>Currently I have a lot of <code>strings</code> in an <code>array</code> that can be filled with all kinds of data. An example:</p>
  
  <pre><code>var obj = new Example();    
  var test = new Test();
  
  // This must be stored in a text file
  var text = new[] {
      $"{obj} contains {obj.attribute}",
      $"This is a {test.title}"
  }
  
  foreach (var line in text)
      Console.WriteLine(line);
  </code></pre>
  
  <p>As you see, this <code>text</code> array is filled with different strings, which contain external data (for example, data from the <code>obj</code> and <code>test</code> objects).</p>
  
  <hr>
  
  <p><em>My question:</em>
  The goal is to read lines of <code>text</code> from a <code>.txt file</code> and load them into the <code>text</code> variable, so the result will be the same as above. </p>
  
  <p>The only condition is that this text file must include all the 'variables', like <code>obj</code> and <code>test.title</code>, so it will print the correct data contained in these objects. How do I store these lines in a <code>.txt file</code> and load them into the application?</p>