你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Throw Class

Definition

Defines utility methods for validating arguments.

public static class Throw
type Throw = class
Public Class Throw
Inheritance
System.Object
Throw

Methods

IfArgument(Boolean, String, String)

Throws ArgumentException with the given parameter name and optional message if the given Boolean value is true.

IfArgumentNull<T>(T, String, String)

Throws ArgumentNullException with the given parameter name and optional message if the given reference is null.

IfArgumentNullOrEmpty(String, String, String)

Throws ArgumentNullException or ArgumentException with the given parameter name and optional message if the given string is null or empty, respectively.

IfArgumentOutOfRange(Boolean, String, String)

Throws ArgumentOutOfRangeException with the given parameter name and optional message if the given Boolean value is true.

IfNullOrEmptySearchServiceName(String)

Throws ArgumentNullException or ArgumentException with a pre-determined message if the given search service name is null or empty, respectively.

Applies to