Using CLR type name only when accessing static member, alias otherwise

Is there any way how to use both of "bool" vs "Boolean" / "string" vs "String" / ... etc. without being notified about possible code cleanup option? I can see option "When referencing built-in type, prefer using... [Keyword | CLR type name]" - unfortunately I do prefer both cases for different occasions.

  • Using CLR type when accessing any static member on that type
  • Using alias when referencing type (declaring variable, argument, typecast, ...)

bool isThisBoolean = (String.IsNullOrEmpty(String.Empty));

public string GetProductName(string leName)
    if (String.IsNullOrEmpty(leName))
        return String.Empty;

    return leName.Trim();

Please sign in to leave a comment.