Cuemon .NET Framework
ThrowIfEnum<TEnum>(String,Boolean,String,String) Method

The type of the enumeration.
The value to be evaluated.
true to ignore case; false to regard case.
The name of the parameter that caused the exception.
A message that describes the error.
Validates and throws an System.ArgumentException if the specified value represents an enumeration.
Syntax
'Declaration
 
Public Overloads Shared Sub ThrowIfEnum(Of TEnum As {New, IConvertible, Struct})( _
   ByVal value As String, _
   ByVal ignoreCase As Boolean, _
   ByVal paramName As String, _
   ByVal message As String _
) 
public static void ThrowIfEnum<TEnum>( 
   string value,
   bool ignoreCase,
   string paramName,
   string message
)
where TEnum: new(), IConvertible, struct

Parameters

value
The value to be evaluated.
ignoreCase
true to ignore case; false to regard case.
paramName
The name of the parameter that caused the exception.
message
A message that describes the error.

Type Parameters

TEnum
The type of the enumeration.
Exceptions
ExceptionDescription
System.ArgumentExceptionvalue represents an enumeration.
Requirements

Target Platforms: Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Validator Class
Validator Members
Overload List

 

 


| Cuemon is licensed under a The MIT License (MIT)



© 2009-2015 Weubphoria. All Rights Reserved.

Documentation made easy with Document! X by Innovasys

Send Feedback