The significance of <> in C#

前端 未结 3 1033
礼貌的吻别
礼貌的吻别 2020-12-05 00:25

I\'m studying C# and caught a piece of code that I don\'t understand. I was hoping that you could clearify it for me.

CreateCustomerTask.<>c__DisplayCl         


        
3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-05 00:51

    Use this answer by Eric Lippert to decode names such as <>c__DisplayClass0. According to the table provided in the answer, you are looking at an anonymous method closure class. Do not rely on this always being true in the future, it is an implementation detail subject to change at any time.

提交回复
热议问题