C# Class Ensure.EnsureStringExtensions

显示文件 Open project: afnpires/Ensure

Public Methods

Method Description
EnsureNotNullOrEmpty ( string value, string name = null ) : void

Throws a ArgumentNullException if value is null or empty.

EnsureNotNullOrWhitespace ( string value, string name = null ) : void

Throws a ArgumentNullException if value is null, empty, or whitespace.

Method Details

EnsureNotNullOrEmpty() public static method

Throws a ArgumentNullException if value is null or empty.
/// Throws when is null or empty. ///
public static EnsureNotNullOrEmpty ( string value, string name = null ) : void
value string /// The value to be verified. ///
name string /// The name that will be passed as argument of the being thrown. ///
return void

EnsureNotNullOrWhitespace() public static method

Throws a ArgumentNullException if value is null, empty, or whitespace.
/// Throws when is null, empty or whitespace. ///
public static EnsureNotNullOrWhitespace ( string value, string name = null ) : void
value string /// The value to be verified. ///
name string /// The name that will be passed as argument of the being thrown. ///
return void