Skip to content

LuaTable to List? #7

Description

@dsblank

How can one get a LuaTable into a C# list?

I have tried variations of:

public static System.Collections.Generic.List ToList(LuaSharp.LuaTable table) {
System.Collections.Generic.List list = new System.Collections.Generic.List();
System.Collections.Generic.KeyValuePair<object,object> pair in table) {
list.Add(pair.Key.ToString());
}
return list;
}

but, I get a Mono crash when I try to generate the KeyValue Enumerator.

Ideas?

-Doug

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions