In .Net pre 2.0, \"\"
creates an object while String.Empty
creates no object. So it is more efficient to use String.Empty.
.Length == 0
is the fastest option, but .Empty
makes for slightly cleaner code.
As @chadmyers mentioned, in version 2.0 and above of .Net, all occurrences of \"\"
refer to the same string literal.
So \"\"
is pretty equivalent to .Empty
, but still not as fast as .Length == 0
.