protected static ConstructorInfo GetConstructorWithArgCount(Type t, int numArgs) { ConstructorInfo[] cis = t.GetConstructors(); foreach (ConstructorInfo ci in cis) { if (ci.GetParameters().Length == numArgs) { return ci; } } return null; }