Multiple choice technology web technology

How would you be best able to check a string value for null? String value is to be checked before setting value from DataSet which is having value as per database

  1. if(stringValue == null)

  2. if(string.IsNullOrEmpty(stringValue))

  3. if(stringValue == DbNull.value)

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

When checking database values stored in an ADO.NET DataSet, missing database values are represented by DBNull.Value, not C# null. Thus, comparing the value to DBNull.Value is correct. Note that the option text contains a typo 'DbNull.value' instead of 'DBNull.Value', but it represents the correct concept.