3 ways to convert Null values to Empty string using C#

Rajnilari2015
Posted by Rajnilari2015 under C# category on | Points: 40 | Views : 218
string sampleString = null;
var result1 = sampleString ?? string.Empty;
var result2 = string.Concat(sampleString);
var result3 = String.IsNullOrEmpty(sampleString) ? "" : sampleString;

Comments or Responses

Login to post response