Assembly: Microsoft.EnterpriseManagement.Core (in microsoft.enterprisemanagement.core.dll)
Usage
Visual Basic |
---|
Dim value As String Dim maximumLength As Integer Dim nullOrEmptyOk As Boolean Dim paramName As String ValidationHelper.ValidateString(value, maximumLength, nullOrEmptyOk, paramName) |
Syntax
Visual Basic |
---|
Public Shared Sub ValidateString ( _ value As String, _ maximumLength As Integer, _ nullOrEmptyOk As Boolean, _ paramName As String _ ) |
C# |
---|
public static void ValidateString ( string value, int maximumLength, bool nullOrEmptyOk, string paramName ) |
C++ |
---|
public: static void ValidateString ( String^ value, int maximumLength, bool nullOrEmptyOk, String^ paramName ) |
J# |
---|
public static void ValidateString ( String value, int maximumLength, boolean nullOrEmptyOk, String paramName ) |
JScript |
---|
public static function ValidateString ( value : String, maximumLength : int, nullOrEmptyOk : boolean, paramName : String ) |
Parameters
- value
-
The value to validate.
- maximumLength
-
The maximum length of the string. Use 0 if there is no maximum.
- nullOrEmptyOk
-
Indicates if a null or empty string is OK to use.
- paramName
-
The name of the parameter to throw the exception for.
Thread Safety
Any public static (Shared in Visual
Basic) members of this type are thread safe. Any instance members
are not guaranteed to be thread safe.