Tool to refactor C# var to explicit type

前端 未结 7 643
陌清茗
陌清茗 2020-12-03 17:15

Our coding standards ask that we minimise the use of C# var (suggests limiting it\'s use to being in conjunction with Linq). However there are times when using generics wher

相关标签:
7条回答
  • 2020-12-03 17:59

    May be very late, but I wrote a Visual Studio 2015 extension that does this based on .NET Compiler platform. Replace var with Type It is tested for normal scenarios and if there is a bug, I shall fix it at the earliest and its also open source in case someone wants to contribute or enhance this tool.

    0 讨论(0)
提交回复
热议问题