Start a new topic

Cannot create anonymous object

 With this c# code:

        public void Send()
            var obj = new { 
            string objMsg = obj.ToString();

it fails on


var obj = new $asm.anonymousTypes[24].ctor("Open");
in the transpiled code. I guess not much successful transpilation?

DuoCode 1.1 released, this bug was fixed.


Just wanted to let you know, we reproduced and fixed this bug in the coming version 1.1, released this month.

Thanks for reporting.

It is ok for "flat" anonymous objects but it still fails on "nested" objects like this:


            var obj = new
                header = new {
                    name = "Message1"
                body = new { 
                    action = "go!",
                    data = "blahblah"

Just tested on v1.0. 

Yes, it is ok with 0.6. I've thougth I was on 0.6 but was still on 0.4.


I recall we had this issue on earlier versions of DuoCode, which version are you using?

Can u reproduce it on

Try to upgrade DuoCode to the latest one v0.6, I am sure it will sove it.

Login or Signup to post a comment