开发者

Visual Studio default Auto Complete to use System Type Name

开发者 https://www.devze.com 2023-03-13 08:20 出处:网络
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

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 n开发者_如何学Goot 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...

0

精彩评论

暂无评论...
验证码 换一张
取 消