boutique replica bags up ideas

the best replique rolex and prices here.

julia highlight 99j hair color 10a quality straight human hair lace front wigs 8 - 24 inches pre plucked hairline 13x4 inches lace front brazilian wig onlinefor sale

Best way to check if string is null or empty in C#

Updated on     Kisan Patel

The IsNullOrEmpty method is a very convenient method in that you can check if string is null or zero length.

The IsNullOrEmpty method returns true if the string is Null or Empty Otherwise, this method returns false.

string stringTestResult = "";
if (String.IsNullOrEmpty(stringTestResult))
{
    Console.WriteLine("String is null or empty");
}

There is an another convenient method called String.IsNullOrWhiteSpace that returns true if string is null, empty, or consists only of white-space characters otherwise false.

string stringTestResult = " ";
if (String.IsNullOrWhiteSpace(stringTestResult))
{
    Console.WriteLine("String is null or empty or contain whitespace");
}

C#

Leave a Reply