user2429910
user2429910

Reputation: 21

ExpandoObject in Nemerle

AFAIK Nemerle doesn't have dynamic keyword, late binding doesn't work as well:

late{
        mutable obj=ExpandoObject();   
        obj.test="test"; //MissingMethodException
    }

So, is there a way to use ExpandoObject in Nemerle?

Upvotes: 2

Views: 131

Answers (1)

user299771
user299771

Reputation: 175

"late" use reflection and can't work with ExpandoObject.

But you can use ExpandoObject like Dictionary:

def obj = ExpandoObject() : IDictionary[string, object];
obj["test"] = 42;
WriteLine(obj["test"]);

What do you want to achieve?

Upvotes: 1

Related Questions