System.Int32.Equals C# (CSharp) Method

Equals() public method

public Equals ( int obj ) : bool
obj int
return bool
        public bool Equals(int obj)
        {
            return Equals((object)obj);
        }

Same methods

Int32::Equals ( object obj ) : bool

Usage Example

示例#1
0
    static int Equals(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes <int>(L, 2))
            {
                System.Int32 obj  = (System.Int32)ToLua.CheckObject(L, 1, typeof(System.Int32));
                int          arg0 = (int)LuaDLL.lua_tonumber(L, 2);
                bool         o    = obj.Equals(arg0);
                LuaDLL.lua_pushboolean(L, o);
                ToLua.SetBack(L, 1, obj);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes <object>(L, 2))
            {
                System.Int32 obj  = (System.Int32)ToLua.CheckObject(L, 1, typeof(System.Int32));
                object       arg0 = ToLua.ToVarObject(L, 2);
                bool         o    = obj.Equals(arg0);
                LuaDLL.lua_pushboolean(L, o);
                ToLua.SetBack(L, 1, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: System.Int32.Equals"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
All Usage Examples Of System.Int32::Equals