Coloring instance variables in Visual Studio

前端 未结 3 1354
野趣味
野趣味 2020-12-17 10:33

Is it possible to color instance (and static) variables in C# code in Visual Studio 2010, perhaps using a lightweight extension?

In following example name

相关标签:
3条回答
  • 2020-12-17 10:38

    This will soon be possible, though not for Visual Studio 2010 in particular. There is an open source Visual Studio extension called Roslyn Colorizer which makes use of the new .NET Compiler Platform ("Roslyn") in Visual Studio 2015 Preview to style the appearance of instance variables.

    enter image description here

    0 讨论(0)
  • 2020-12-17 10:42

    This is not possible directly with Visual Studio. However, if you install Resharper, you will get this option (as well as many other coloration options).

    0 讨论(0)
  • 2020-12-17 10:48

    SemanticColorizer is working for me in Visual Studio 2015, it is also available through Extensions and Updates in VS. You can edit colors in Options -> Environment -> Fonts and Colors -> Text Editor -> "Semantic *****". Most important extension is only used for code coloring, it is not some suite with thousands of features which will clog your VS.

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