Remotion.Linq.SqlBackend.BooleanUtility.GetIntToBoolConversionMethod C# (CSharp) Метод

GetIntToBoolConversionMethod() публичный статический Метод

public static GetIntToBoolConversionMethod ( Type intType ) : MethodInfo
intType System.Type
Результат System.Reflection.MethodInfo
    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");
    }
  }