title: Why do type.getConstructor take a type array as inparameter?
body: <p>I am currently trying to learn reflection and have seen some examples where GetConstructor is used, i guess that it is one of the basic functions i need to understand, to be able to start work with reflection. I think that I understand what the code does and how I would use it. </p>
  
  <p>Code example from msdn</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/h93ya84h.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/h93ya84h.aspx</a></p>
  
  <pre><code>types[0] = typeof(int);
  // Get the constructor that takes an integer as a parameter.
  ConstructorInfo constructorInfoObj = myType.GetConstructor(types);
  </code></pre>
  
  <p>The only problem I have with the code, is that i can't understand why I need to create a dummy Type Array to be able to use the GetConstructor method(except from “the method is constructed in that way”). In my mind, the logical inparameter would be an integer containing the index of the constructor I am trying to get by reflection. If a reason exists, can someone explain why a type array is used as inparameter?</p>