vighnu
vighnu

Reputation: 45

Chose a color for a particular method in VS2012

Pretty dumb question I know,

I want to know if there is a way to assign a particular color to a method of my choice in .cs file.

So that i donot even accidently go and write or change anything there.

Upvotes: 0

Views: 26

Answers (1)

Robert Horvick
Robert Horvick

Reputation: 4036

No, Visual Studio does not support this behavior natively (though someone could write an extension that did it).

Some ideas, though...

My first suggestion is to use version control so that any changes you make can be reviewed and reverted.

My second is, in C# you could use a partial class to keep all the code that should never change in one file and the code you can change in another file. You could even go further and set the readonly flag on the file you never want to change (though check how this affects your source control system).

But use version control either way.

Upvotes: 1

Related Questions