문제

As the question states above, what's the difference between a compound type and an anonymous type?

In this answer, a compound typed object is defined with a new {} statement (below statement).

m => new { member = m, split = m.Name.Split(',') }

But isn't that the same as when you create an anonymous typed object? Are they both the same thing by different names?

도움이 되었습니까?

해결책

Those are just different names, yes. The code you put above creates an anonymous type (that is the name you should use, the official one, and the common one).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top