How should I initialize an empty string in C# and why? Which one is faster?
string myString = "";
or
string myString = "".ToString();
How should I initialize an empty string in C# and why? Which one is faster?
string myString = "";
or
string myString = "".ToString();
 
    
     
    
    String.ToString() just returns the string itself :
    public override String ToString() {
        Contract.Ensures(Contract.Result<String>() != null);
        Contract.EndContractBlock();
        return this;
    }
Which means string myString = "".ToString() is pointless. After all, it's already a string
In fact, given that strings are immutable and, in this case, interned, "" is the same string instance returned by String.Empty 
 
    
    The second one is redundant. It's already a string. So the first one would be the best option.
 
    
     
    
    Please use the first one which is the best option
string myString = "";
You can also use string.Empty in C#
string myString = string.Empty;
The second one is pointless because "" which is already a string and converting string("").ToString() is pointless.
 
    
    You can also use 
    string.Empty which is more readable. It has nothing to do with performance.
 
    
    