public static MethodInfo GetIntToBoolConversionMethod (Type intType)
{
if (intType == typeof (int))
return typeof (Convert).GetMethod ("ToBoolean", new[] { typeof (int) });
else if (intType == typeof (int?))
return typeof (BooleanUtility).GetMethod ("ConvertNullableIntToNullableBool", new[] { typeof (int?) });
else
throw new ArgumentException ("Type must be Int32 or Nullable<Int32>.", "intType");
}
}