Request: prefer CLR primitive type over C# alias when generating properties
Take a look at the following code extract:
1: using System; 2: 3: namespace ClassLibrary1 4: 15: set 16: 19: } 20: } 21: }I have defined in Class1 a field name and I have used the CLR Primitive Type String. When generating a new property using Alt + Insert the type of the property is the C# alias "string" for System.String. It would be nice if ReSharper respects the fact that the developer chose for the CLR Primitive type over the C# alias.
--
Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net
Please sign in to leave a comment.
The same issue occurs when using the Smart Code Complete (Ctrl + Shift + Space) for conversions using the as operator.
String name = "Lozano" as string;
I prefer and it should be like this :)
String name = "Lozano" as String;
Regards
--
Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net
"Gabriel Lozano-Morán" <jb-newsgroups@pointerx.net> wrote in message news:e675oq$non$1@is.intellij.net...
Take a look at the following code extract:
1: using System; 2: 3: namespace ClassLibrary1 4: 15: set 16: 19: } 20: } 21: }I have defined in Class1 a field name and I have used the CLR Primitive Type String. When generating a new property using Alt + Insert the type of the property is the C# alias "string" for System.String. It would be nice if ReSharper respects the fact that the developer chose for the CLR Primitive type over the C# alias.
--
Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net
And off course the explicit casts as well:
String name = (string) number;
"Gabriel Lozano-Morán" <jb-newsgroups@pointerx.net> wrote in message news:e69onf$lkj$1@is.intellij.net...
The same issue occurs when using the Smart Code Complete (Ctrl + Shift + Space) for conversions using the as operator.
String name = "Lozano" as string;
I prefer and it should be like this :)
String name = "Lozano" as String;
Regards
--
Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net
"Gabriel Lozano-Morán" <jb-newsgroups@pointerx.net> wrote in message news:e675oq$non$1@is.intellij.net...
Take a look at the following code extract:
1: using System; 2: 3: namespace ClassLibrary1 4: 15: set 16: 19: } 20: } 21: }I have defined in Class1 a field name and I have used the CLR Primitive Type String. When generating a new property using Alt + Insert the type of the property is the C# alias "string" for System.String. It would be nice if ReSharper respects the fact that the developer chose for the CLR Primitive type over the C# alias.
--
Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net
I remember there is such request in the Tracker already. We plan to provide
a code style option to control this. I don't know whether we'll implement
it in the next version or not.
Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"