コード例 #1
0
        public static bool Eq(ValueProxy val1, ValueProxy val2, out bool res)
        {
            res = false;
            switch (conv_t[val1.GetValueCode(), val2.GetValueCode()])
            {
                case -1:
                    return val2.Promote(val1).TryEq(val2, out res);

                case 0:
                    return val1.TryEq(val2, out res);

                case 1:
                    return val1.TryEq(val1.Promote(val2), out res);

                default:
                    {
                        if (conv_t[val2.GetValueCode(), val1.GetValueCode()] == 1)
                            return val2.Promote(val1).TryEq(val2, out res);
                        return false;
                    }
            }
        }