ValidationHelper.ValidateString Method
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Validates a string.
Namespace: Microsoft.EnterpriseManagement
Assembly: Microsoft.EnterpriseManagement.Core (in Microsoft.EnterpriseManagement.Core.dll)
Usage
'Usage
Dim value As String
Dim maximumLength As Integer
Dim nullOrEmptyOk As Boolean
Dim paramName As String
ValidationHelper.ValidateString(value, maximumLength, nullOrEmptyOk, paramName)
Syntax
'Declaration
Public Shared Sub ValidateString ( _
value As String, _
maximumLength As Integer, _
nullOrEmptyOk As Boolean, _
paramName As String _
)
public static void ValidateString (
string value,
int maximumLength,
bool nullOrEmptyOk,
string paramName
)
public:
static void ValidateString (
String^ value,
int maximumLength,
bool nullOrEmptyOk,
String^ paramName
)
public static void ValidateString (
String value,
int maximumLength,
boolean nullOrEmptyOk,
String paramName
)
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.
Platforms
Development Platforms
Windows Vista, Windows Server 2003, and
Target Platforms
Windows Server 2008,Windows Server 2003
See Also
Reference
ValidationHelper Class
ValidationHelper Members
Microsoft.EnterpriseManagement Namespace