views:

430

answers:

4

For example, I want class fields, method names, and properties to be boldfaced, but I don't want them to be boldfaced inside method bodies. e.g.,

public static void **WriteStuff**(string notEvenUsed) {
    var x = 0;
    Console.WriteLine("Stuff");
}

I want WriteStuff to be in bold, but not WriteLine, x, or notEvenUsed.

A: 

I do not think it is possible.

You can however write to a file using html. It'll be as simple as it goes.

User
I think the OP is referring to the formatting of the code in the VS editor, not the output of the Console.Write.
Andrew Hare
A: 

There are no built-in methods for doing what you want. I believe that ReSharper allows you to make more advanced color customizations but I would be surprised if it allowed such granularity.

Andrew Hare
+1  A: 

You could write a Visual Studio add-in to do this, but you would have a lot of work ahead of you -- you would need to write your own C# parser, not a task for the faint of heart.

ReSharper has more color-coding options than vanilla Visual Studio (e.g. it would color-code notEvenUsed to show that it's not even used), but they don't currently have an option to bold the declaration only. I've actually already written up a ReSharper enhancement request for this very feature. Feel free to vote for that enhancement; maybe they'll put it in (and we'll both be happy).

Joe White
A: 

Visual Assist also allows you to make more color customizations.

sean e