In C#, I want to initialize a string value with an empty string.
How should I do this? What is the right way, and why?
string willi = string.Empty;
String.Empty and string.Empty are equivalent. String is the BCL class name; string is its C# alias (or shortcut, if you will). Same as with Int32 and int. See the docs for more examples.
String.Empty
string.Empty
String
string
Int32
int
As far as "" is concerned, I'm not really sure.
""
Personally, I always use string.Empty.