简体   繁体   中英

Visual Studio default Auto Complete to use System Type Name

Strange question but my boss is a touch old school and has insisted in our coding standards that we do not use C# shorthands for system types, he likes us to use the full system name. He likes things to be verbose and I happily comply with the standard.

However, something which after several months has started to grate on me is the fact that visual studio does not like to comply with the standard when completing code. So if I type:

KeyValuePair<Int32, Object> MyValue = new

Visual studio will finish the rest with:

KeyValuePair<int,object>

This is even worse when implementing an interface or abstract class.

This is a minor inconveniance but one none the less and I was wondering whether in the plethora of VS options there was one to force using the full System type names.

I believe that this can be solved use something like Re-Sharper but unfortunately there's no way I'm getting a license.

EDIT

Yes he despises the use of the var keyword. I should have stated his actual reasoning, it's because we mostly develop in C# but there is a high probability of needing to write in C and objective C so he does not want us to become too reliant upon CLR shorthands and he also says it would cause less pain when porting code which to a degree makes sense to me. His main aim with this is to avoid type mis matches with types such as Int16, Int32 & Int64 but as we are following a standard he prefers String over string. In all fairness, he is a very good coder if not a touch old school but his knowledge of things under the hood is vastly greater than mine and 90% of devs that I know, coming from a gaming background I guess makes you appreciate the finer points a touch more. I've always been spoilt with a nice managed .NET framework.

Many Thanks

Paul

My research indicates this is not possible. Maybe in a future version of Visual Studio...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM