ExpandoObject in Nemerle

135 views Asked by At

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?

1

There are 1 answers

2
user299771 On

"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?