Is there any technical reason to use or not to use var in C# when the type is known?

后端 未结 8 2122
南方客
南方客 2021-01-02 04:05

It seems that more and more C# code I read uses the var type identifier:

foreach (var itemChange in ItemChanges)
{
   //... 
}
8条回答
提交回复
热议问题