public static Type GetMatchingBoolType (Type type)
{
ArgumentUtility.CheckNotNull ("type", type);
if (type == typeof (int))
return typeof (bool);
else if (type == typeof (int?))
return typeof (bool?);
else
throw new ArgumentException ("Type must be Int32 or Nullable<Int32>.", "type");
}