Edit Embed Interface Template in Visual Studio

I constantly use the "Implementation Interface" shortcut in Visual Studio 2008. My "problem" is that I want Visual Studio to use String-alias instead of the string in each instance.

Since I have to use String instead of string, this would save me a huge amount of time. For example, I want the following:

public Catalogue(String url) { } 

instead

 public Catalogue(String url) { } 

Is it possible? Where can I find these templates?

+4
source share
2 answers

You cannot change the templates used during refactoring.

Templates that you can modify are available in% ProgramFiles% \ Microsoft Visual Studio 9.0 \ Common7 \ IDE. In particular, most CSharp for empty files, etc. Located in% ProgramFiles% \ Microsoft Visual Studio 9.0 \ Common7 \ IDE \ ItemTemplates \ CSharp

Perhaps the person making you use "String" would change his ways if he realized how much time wasted. I personally do not understand this ...

The IDE uses a "string" rather than a "String" in all generated code - therefore, forcing a non-standard "standard", your team invites you to inconsistency. People may argue that it is better until they turn blue in the face - but, as you point out, using "String" is a pain in the ass .

+6
source

just replace string with string (whole case-sensitive word) or do not use this factoring pattern. because after exam% ProgramFiles% \ Microsoft Visual Studio 9.0 \ Common7 \ IDE \ it looks hard-coded

+1
source

All Articles