Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

string isnullorempty vs isnullorwhitespace

/* IsNullOrWhiteSpace is a convenience method that is similar to 
the following code, except that it offers superior performance: */

return String.IsNullOrEmpty(value) || value.Trim().Length == 0;

/* White-space characters are defined by the Unicode standard. 
The IsNullOrWhiteSpace method interprets any character that returns
a value of true when it is passed to the Char.IsWhiteSpace method as
a white-space character. */
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity key up 
Csharp :: linq from select 
Csharp :: console reset color c# 
Csharp :: c# how to sort a list 
Csharp :: https request c# 
Csharp :: dynamic arrays in c# 
Csharp :: bitmap to imagesource c# 
Csharp :: c# cast to int 
Csharp :: add mime type for woff in web.config 
Csharp :: .net mvc decimal displayformat currency 
Csharp :: c# new dictionary linq 
Csharp :: c# lambda join two tables 
Csharp :: c# save pdf to folder 
Csharp :: c# date format 
Csharp :: c# create dynamic json 
Csharp :: c# multiline comment 
Csharp :: c# for loop next iteration 
Csharp :: how to convert date to Complete ISO-8601 date in c# 
Csharp :: how to get the transform of an object in unity 
Csharp :: c# mongodb update multiple fields 
Csharp :: unity audio 
Csharp :: c# getting user input 
Csharp :: how to create a list c# 
Csharp :: sorting a list of objects in c# 
Csharp :: dotnet automapper.extensions.microsoft.dependencyinjection 
Csharp :: vector2 with switch statement 
Csharp :: c# string enum 
Csharp :: multi line comment c# 
Csharp :: c# calculate sum of list 
Csharp :: unity c# struct 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =