Is there a way to concact C# anonymous types?

Posted by Matthew T. on Stack Overflow See other posts from Stack Overflow or by Matthew T.
Published on 2010-04-28T04:56:20Z Indexed on 2010/04/28 5:03 UTC
Read the original article Hit count: 273

Filed under:
|
|

For example

var hello = new { Hello = "Hello" };
var world = new { World = "World" };
var helloWorld = hello + world;
Console.WriteLine(helloWorld.ToString());
//outputs {Hello = Hello, World = World}

Is there any way to make this work?

© Stack Overflow or respective owner

Related posts about c#

Related posts about anonymous