GouthamAnand
asked on
What is the difference between null & String.Empty
Can any one explain me what is the difference between below 2 statements.
string FirstName = null;
string FirstNmae = String.Empty;
When should I use which?
string FirstName = null;
string FirstNmae = String.Empty;
When should I use which?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you.
""
string FristName = ""; instead of this use string FirstName = string.Empty;