static int CompareTo(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);
int o = obj.CompareTo(arg0);
LuaDLL.lua_pushinteger(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);
int o = obj.CompareTo(arg0);
LuaDLL.lua_pushinteger(L, o);
ToLua.SetBack(L, 1, obj);
return(1);
}
else
{
return(LuaDLL.luaL_throw(L, "invalid arguments to method: System.Int32.CompareTo"));
}
}
catch (Exception e)
{
return(LuaDLL.toluaL_exception(L, e));
}
}