MethodInfo GetToDecimalConversionMethod(IType type)
{
MethodInfo method =
typeof(Decimal).GetMethod("op_Implicit", new Type[] { GetSystemType(type) });
if (method == null)
{
method =
typeof(Decimal).GetMethod("op_Explicit", new Type[] { GetSystemType(type) });
if (method == null)
{
NotImplemented(string.Format("Numeric promotion for {0} to decimal not implemented!", type));
}
}
return method;
}