lua_setfield() private méthode

private lua_setfield ( IntPtr luaState, int index, [ MarshalTypeRef = typeof(UTF8Marshaler))]stringkey ) : void
luaState System.IntPtr
index int
MarshalTypeRef [
Résultat void
 public static void PushDictionary(this IntPtr L, Dictionary <string, double> dict)
 {
     Lua.lua_newtable(L);
     foreach (var pair in dict)
     {
         Push(L, pair.Value);
         Lua.lua_setfield(L, -2, pair.Key);
     }
 }
        public static void PushDictionary(this IntPtr L, Dictionary <string, string> dict)
        {
            Lua.lua_newtable(L);
            foreach (var pair in dict)
            {
                if (pair.Value != null)
                {
                    Push(L, pair.Value);
                }
                else
                {
                    L.PushNull();
                }

                Lua.lua_setfield(L, -2, pair.Key);
            }
        }