StringExt.ThrowIfNullOrWhitespace Method

Throws an exception if the string is null or only contains whitespaces.

Namespace: UltimateXR.Extensions.System
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public static void ThrowIfNullOrWhitespace(
	this string self,
	string paramName
)

Parameters

 

self
Type: System.String
The string to check
paramName
Type: System.String
The parameter name, used as argument for the exceptions

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ExceptionCondition
ArgumentNullExceptionself is a null reference (Nothing in Visual Basic)
ArgumentExceptionWhitespace string is not allowed

See Also

Reference

StringExt Class
UltimateXR.Extensions.System Namespace