title: Parse C# functions from JSON files
body: <p>I'm messing around with game item implementations, and to avoid hard-coding the items, I'd like to load their information and implementations from external files.</p>
  
  <p>The basic format would be something like this:</p>
  
  <pre><code>-- Items.json
  [
      {
          "name": "Rusty Key",
          "shortDesc": "A rusty key.",
          "longDesc": "A slightly rusty key. You don't know what door it opens.",
          "code": "RustyKey.cs"
      }
  ]
  </code></pre>
  
  <p>OR embed the <code>Use()</code> code directly into the JSON file:</p>
  
  <pre><code>-- Items.json
  [
      {
          "name": "Rusty Key"
          ...
          "use": "return 0;"
      }
  ]
  </code></pre>
  
  <p>The JSON file would be loaded at runtime and dynamically add the items as well as their implementations. </p>
  
  <p>This could also perhaps morph into a simple scripting language allowing players to create their own items, but in its current form I would not release it to the public due to the potential for abuse.</p>
  
  <p>So my question is this: how can I load/parse the attached script file OR embedded code and attach it to the dynamically-created object?</p>