crackyourinterview.com


To improves our performance please Like Share Subscribe(Will boost us)

Syntax and use of IsNullOrEmpty and IsNullOrWhiteSpace in csharp
Question Posted on 01 Oct 2020Home >> DotNet >> C# >> Syntax and use of IsNullOrEmpty and IsNullOrWhiteSpace in csharp

Syntax and use of IsNullOrEmpty and IsNullOrWhiteSpace in csharp
Both of these will retrn he boolean values which is either true or false . Below syntax will helps you to understand use of these keywords in c#.
(1)string.IsNullOrEmpty:-From this we will check either string is null or empy if it is then it will return true. And it will checks for string references that are null or have no data.
if (string.IsNullOrEmpty(s) == true)
{
// True.
Console.WriteLine("Null or empty");
}

2)string.IsNullOrWhiteSpace:-And it will checks for string references that are null or have no white space.
bool a = string.IsNullOrWhiteSpace(" ");
0
0



.


Most Visited Questions:-

Deep Learning Questions Answers
Below are the different Deep Leaning Questions and answer a More...

Continuous Integration Questions Answers
Below are the 20 odd questions for CI or Continuous Integra More...

Derived relationships in Association Rule Mining are represented in the form of __________.
Derived relationships in Association Rule Mining are repres More...

What is Gulpjs and some multiple choice questions on Gulp
Gulpjs is an open source whihc helps in building Javascript More...

Microservices Architecture Questions Answers
Below are the different questions on Microservices Architec More...




Other Important Questions

Simplest definition of partial classes and its rules?

Definition of Tuple class with some examples?

Define Race Condition in cSharp?

C#.Net Reserve Words

can we inherit private class level variables in c#






@2014-2022 Crackyourinterview (All rights reserved)
Privacy Policy - Disclaimer - Sitemap