Performance of anonymous types in C#

后端 未结 5 1725
傲寒
傲寒 2020-12-20 13:03

Is it bad to use anonymous types in C#?

5条回答
  •  温柔的废话
    2020-12-20 13:38

    An anonymous type in C# is still a static type and accessing its methods and properties is resolved by the compiler. The performance is comparable to explicit types.

提交回复
热议问题