Bug Report T753492
Visible to All Users

Code Cleanup – Code cleanup incorrectly generates an explicit type name for the List<string> type

created 6 years ago

[DevExpress Support Team: CLONED FROM T753143: CodeRush Copyright Header only on new Files]
Hey Pavel,

Additionally, i implemented a rule, which should convert all var-types to the explicit type (e.g. string). This works somewhat fine, but it adds the fully qualified name for Lists, but not for normal variables.

Example:

C#
var test = new List<string>() { "asdf", "asdf2", "asdf3" }; // gets converted to global::System.Collections.Generic.List<string> test = new List<string> { "asdf", "asdf2", "asdf3" };

but

C#
var test = "asdf";

is convertet to

C#
string test = "asdf";

when i save. Is there a option in CodeRush i set wrong?

Thanks for the help

Andri

Comments (1)
DevExpress Support Team 6 years ago

    Hello Andri,

    Thank you for pointing out to this issue. I have reproduced it on my side.
    We will research it and let you know when we have any results.

    Answers approved by DevExpress Support

    created 6 years ago

    We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

    Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.