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 is synonym for System.String type, They are identical.
Values are also identical: string.Empty == String.Empty == ""
I would not use character constant "" in code, rather string.Empty or String.Empty - easier to see what programmer meant.
Between string and String I like lower case string more just because I used to work with Delphi for lot of years and Delphi style is lowercase string.
So, if I was your boss, you would be writing string.Empty