Possible Duplicate:
In C#, should I use string.Empty or String.Empty or “” ?
I just don’t understand the benefits of using String.Empty over “”. Aside it being strongly typed its longer.
So please, why should I be using this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As has been mentioned
string.Emptycreates no object where as""will create an object (albeit pulled out of the pool). The performance difference is minimal but the question should be what is more readable. I take the stance thatstring.Emptysticks out more than""and I can clearly see the intent of the declaration (string.Empty vs null). Regardless of your choice you should be consistent throughout your code base.String.Empty vs “”