functionDicToLuaTable(Dic)--将C#的Dic转成Lua的Tablelocal dic ={}if Dic thenlocal iter = Dic:GetEnumerator()while iter:MoveNext()dolocal k = iter.Current.Keylocal v = iter.Current.Valuedic[k]= vendendreturn dic
end
将C#List转成luaTable
functionListToTable(List)--将C#的List转成Lua的Tablelocal list ={}if List thenlocal index =1local iter = List:GetEnumerator()while iter:MoveNext()dolocal v = iter.Currentlist[index]=vindex = index +1endelselogError("Error,CSharpList is null")endreturn list
end