String Functions

string.IsNullOrEmpty()read more here

Code Sample:

string output = string.IsNullOrEmpty(someString) ? "0" : someString; 
 You can also use the null coalescing operator (??), but it would not handle empty strings. 
 string output = somePossiblyNullString ?? "0";

string.sNullOrWhiteSpace() – Indicates whether a specified string is null, empty, or consists only of white-space characters.

string.Empty – declare a empty string

string.ToUpper() – covert the string to uppercase

string.Split() – extracts sub-string in string

Leave a Reply

Your email address will not be published. Required fields are marked *