C# @ modifier for methods parameters

后端 未结 6 1591
心在旅途
心在旅途 2021-02-18 13:56

I was using ReSharper plugin on VS2010 and i was generating an interface method. ReSharper put an @ on the parameter name. WHat is that used for?

int Count(Func&         


        
6条回答
  •  野的像风
    2021-02-18 14:35

    It will stop this parameter acting like a keyword (as whereis a keyword in linq amongst other things).

提交回复
热议问题