Is use of string.IsNullOrEmpty(string) when checking a string considered as bad practice when there is string.IsNullOrWhiteSpace(string) in .NET 4.0 and above?
Is use of string.IsNullOrEmpty(string) when checking a string considered as bad practice when there
Share
The best practice is selecting the most appropriate one.
Reference : Here
Reference : Here
Check the source code (Reference Source .NET Framework 4.6.2)
IsNullorEmpty
IsNullOrWhiteSpace
Examples