Cuemon .NET Framework
ThrowIfContainsType(Object,String,Type[]) Method

The value to be evaluated.
The name of the parameter that caused the exception.
A variable number of System.Type arguments to match with the type of value.
Validates and throws an System.ArgumentOutOfRangeException if the specified value is contained within at least one of the specified types.
Syntax
'Declaration
 
Public Overloads Shared Sub ThrowIfContainsType( _
   ByVal value As Object, _
   ByVal paramName As String, _
   ByVal ParamArray types() As Type _
) 
public static void ThrowIfContainsType( 
   object value,
   string paramName,
   params Type[] types
)

Parameters

value
The value to be evaluated.
paramName
The name of the parameter that caused the exception.
types
A variable number of System.Type arguments to match with the type of value.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionvalue is null - or - types is null.
System.ArgumentOutOfRangeExceptionvalue is contained within at least one of the specified types.
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