Answer: We can check whether string is Empty or not with the help of
String'Length property .
For Example:-
string name = "Rajesh Kumar Sathua";
if (name.Length > 0)
{
MessageBox.Show("string has a value");
}
else
{
MessageBox.Show("string is empty");
}
Asked In: Many Interviews |
Alert Moderator