Search code examples
visual-studiovisual-c++parameters

Why does Visual Studio gray out parameter names?


Does anyone know why VS likes to gray out parameter names in a function? Is it to discourage reads/writes to the parameter stack allocation? Or perhaps to make aware of the fact that you are using the parameter and not, say, a class member variable? Just curious.


Solution

  • I can confirm @HansPassant's comment of being able to change C++ parameter font color in Tools > Options > Environment > Fonts and Colors > Display Items. Here is the original:

    Gray Parameters

    After the change:

    Teal Parameters

    I chose teal because it didn't seem to clash with other readily present colors.

    At any rate, it was not colored grey because of the parameter not being used.