What are the ways to check if string has no values defined in it?

 Posted by Vishalneeraj-24503 on 5/16/2015 | Category: Visual Studio Interview questions | Views: 1529 | Points: 40
Select from following answers:
  1. if (string_variable != null || string_variable != "") { }
  2. if (string_variable != null || string_variable != string.Empty) { }
  3. if(string.IsNullOrEmpty(string_variable)) { }
  4. All of the above.
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response