Search This Blog

Thursday, January 2, 2014

Difference between String.Empty and ""?

The difference between string.Empty and "" is very small. String.empty will not create any object while "" will create a new object in the memory for the checking. Hence string.empty is better in memory management.

Example
string s1=String.Empty;
string s2="";

No comments:

Post a Comment