Avoiding C# aliases

I have looked for this in the options, but cannot find anything relevant.

Resharper is very keen to use the C# aliases for types, rather than their underlying names - to 'Int32' gets turned into 'int' and String into string, for example.

Is there any way to stop this?

2 comments
Comment actions Permalink

Hello,

according to the .NET Design Guidelines it's a best practice to use language
specific aliases where possible.

The only place where you should use the underlying types in in member names
(like Convert.ToInt32).

Kind regards,
Henning Krause

"Will Dean" <resharper@indcomp.co.uk> wrote in message
news:3691182.1199981579088.JavaMail.itn@is.intellij.net...
>I have looked for this in the options, but cannot find anything relevant.
>

Resharper is very keen to use the C# aliases for types, rather than their
underlying names - to 'Int32' gets turned into 'int' and String into
string, for example.

>

Is there any way to stop this?


0
Comment actions Permalink

I have that book open on my desk at but it contains (in different sections) both Jeff Richter saying he never uses them at all, and then official guidance to prefer them.

So even the advice from MS is clearly inconsistent. But regardless, if I want to use type names to clearly, explictly, document that something is 16-bit, for example, it's a pity if the refactoring tool runs around trying to subvert me in a way which I'm unable to disable (if indeed that's the case, which was my original question).

Heaps of the options in the R# are to allow you to subtly vary from the guidance, my feeling is that this ought to be one.

0

Please sign in to leave a comment.