2

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 Answers1

1

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

user299771
  • 175
  • 3
  • I would use dictionary if I wanted to, I'm just interested if I can use ExpandoObject like it's intended to: `dynamic obj=new ExpandoObject();obj.test="test";` – user2429910 May 30 '13 at 16:12
  • 1
    'dynamic' is not supported in Nemerle right now. It can be implemented but no one needed it. – NN_ Jun 04 '13 at 08:54