7
Answers

String.empty v.s. string.null

George George

George George

16y
14.2k
1

Hello everyone,


I am doing input parameter checking for a string type, and string value except empty is valid. My function is provided to outer client to call. Sometimes I find to check null is not enough, I also need to check String.Empty.

My question is, what are the differences between null and String.Empty? I have made some web search for the answers but not very useful information.


thanks in advance,
George

Answers (7)