Alternative way of checking string whether it contains values or not?

 Posted by vishalneeraj-24503 on 7/1/2014 | Category: C# Interview questions | Views: 273 | Points: 40

Use string Length static property to check where string is empty or not.

For Example:-
string value = "Vishal";

int length = value.Length;

Note:-If the variable length value is greater than 0 then string has a value assigned to it.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response