コード例 #1
0
        public static ILSugar CallOrCallvirt(this ILSugar il, Type type, MethodInfo method)
        {
            if (method.IsVirtual && !type.IsValueType)
            {
                il.Callvirt(method);
            }
            else
            {
                il.Call(method);
            }

            return(il);
        }