Skip to content

LuaTable to List? #7

@dsblank

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

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