Reputation: 1112
In Visual Studio 2013, is there a way to change the syntax colouring of C# method parameters?
e.g. Can I have AAA and BBB colored, but not someInt, Foo, ToString
private int MyMethod(int AAA, int BBB)
{
int someInt = new int();
someInt = AAA + BBB;
string Foo = AAA.ToString();
}
I tried going to Tools -> Options -> Environment -> Fonts and Colours -> Text Editor and changing Identifier, but this changed the coloring of just about everything (variables, methods, parameters).
Upvotes: 10
Views: 11825
Reputation: 1098
Now you can do this in Visual Studio without any extension.
Here is VS 2022
Upvotes: 3
Reputation: 67
For VS 2017 you can use.
Enhanced Syntax Highlighting by Stanislav Kuzmich
Upvotes: 1
Reputation: 61
I recently found this extention while looking for the same thing for TypeScript, apparently it supports C# and VisualBasic, so it may be helpful for you and anybody else looking:
Visual studio SemanticColorizer
Upvotes: 6
Reputation: 51430
ReSharper can do this.
First, check this in ReSharper options:
Then choose the color in the VS options:
End result:
Upvotes: 11
Reputation: 731
Unfortunately, you will not find a way to colorize parameter variables with the C# language. You do have the option, however, of writing an extension to do just that. Or, you could rewrite everything in C++, where you can get your parameters colorized.
Upvotes: -6