3 ms·
For my understanding, what is happening in "new { Foo = i, Bar = "hey" }"? Is that some type of tuple or struct or something? Anyway I agree, I like C# for the
by uejfiweun 5y ago
For my understanding, what is happening in "new { Foo = i, Bar = "hey" }"? Is that some type of tuple or struct or something?
Anyway I agree, I like C# for the same reasons I like Java. Very readable but still powerful.
- pipeline_peak 5y agoThat is an anonymous type. They cannot be returned explicitly, but you can instead use "(Foo: i, Bar: "hey")" to return a tuple with properties (int Foo, string Bar)