Performance of anonymous types in C#

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

Is it bad to use anonymous types in C#?

5条回答
  •  臣服心动
    2020-12-20 13:56

    It's not bad, sometimes it is convinient. For example, when using Linq, instead of creating a class that will be used only once, it's preferable to use anonymous types.

提交回复
热议问题