Exemple #1
0
    void UseAsWithNullable(System.ValueType val)
    {
        int?j = val as int?;

        if (j != null)
        {
            Console.WriteLine(j);
        }
        else
        {
            Console.WriteLine("Could not convert " + val.ToString());
        }
    }
        static int _m_ToString(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            System.ValueType __cl_gen_to_be_invoked = (System.ValueType)translator.FastGetCSObj(L, 1);


            try {
                {
                    string __cl_gen_ret = __cl_gen_to_be_invoked.ToString(  );
                    LuaAPI.lua_pushstring(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }