Using string.Emptyinstead is ""really nice and make the code more understandable. I am wondering if there is a good constant to replace " ". I found some ideas, such as using string.Empty.PadLeft(1)or string.Empty.PadRight(1), but I don't like it.
For the situation it would be useful to use string.Spaceinstead " ".
(Edited after comments)
To make my problem more clear:
In multicultural situations, there should be no code, for example "Can not open the file". String literals should be transferred to the resource file and then used as Resources.CanNotOpenTheFile.
To make sure this happens seems like a good rule to not have string literals in your code. Thus, looking at the code at a glance, you can quickly find bad implementations. I think this is a good explanation of why I am trying not to use "in code.
source
share