title: Constructor Injection in C#/Unity?
body: <p>I'm using C# with Microsoft's Unity framework. I'm not quite sure how to solve this problem. It probably has something to do with my lack of understanding DI with Unity.</p>
  
  <p>My problem can be summed up using the following example code:</p>
  
  <pre><code>class Train(Person p) { ... }
  
  class Bus(Person p) { ... }
  
  class Person(string name) { ... }
  
  Person dad = new Person("joe");
  Person son = new Person("timmy");
  </code></pre>
  
  <p>When I call the resolve method on Bus how can I be sure that the Person 'son' with the name 'timmy' is injected and when resolving Train how can I be sure that Person 'dad' with then name 'joe' is resolved?</p>
  
  <p>I'm thinking maybe use named instances? But I'm at a loss. Any help would be appreciated.</p>
  
  <p>As an aside, I would rather not create an IPerson interface. </p>