title: How does Unity.Resolve know which constructor to use?
body: <p>Given a class with several constructors - how can I tell Resolve which constructor to use? </p>
  
  <p>Consider the following example class: </p>
  
  <pre><code>public class Foo
  {
      public Foo() { }
      public Foo(IBar bar)
      {
          Bar = bar;
      }
      public Foo(string name, IBar bar)
      {
          Bar = bar;
          Name = name;
      }
      public IBar Bar { get; set; }        
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>If I want to create an object of type Foo using Resolve how will Resolve know which constructor to use? And how can I tell it to use the right one? Let's say I have a container with an IBar registered - will it understand that it should favor the constructor taking IBar? And if I specify a string too - will it use the <code>(string, IBar)</code> constructor? </p>
  
  <pre><code>Foo foo = unityContainer.Resolve&lt;Foo&gt;(); 
  </code></pre>
  
  <p>And please ignore the fact that it would probably be easier if the class just had a single constructor... </p>