Test for empty strings using string length, not string.Empty or "" to get the best performance.
Because of the implementation of the string class, the most performant method for testing for an empty string is to test for the string length equal to zero. Other methods are effective, but are less performant.
Possible Violations of Rule:
Test for empty string with string.Length instead of string.Empty
Test for empty string with string.Length instead of ""
All rule violations are can be automatically corrected with devAdvantage.
Examples of testing for empty string
[C#]