Options for specifying when var should _not_ be used?
[Build 5.1.1757]
Hi,
Currently I can select in RS options if I want suggestion etc. for replacing type with var:
Use 'var' keyword when initializer explicitly declares type [^]
Use 'var' keyword when possible [^]
But I cannot find options that are similar to the var conventions specified in the code cleanup profiles, i.e. something like miss:
Use explicit type instead of var when initializer doesn't declare type [^]
Use 'var' in foreach [^]
And I think these are too complex for the pattern catalog to handle, right?
Thanks.
Please sign in to leave a comment.
Hello,
At the moment there are no such code inspection options. You're welcome to
add a feature request through our tracker: http://youtrack.jetbrains.net/issues/RSRP.
Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Ok. Added request at http://youtrack.jetbrains.net/issue/RSRP-198261 .
Thanks.