Cuemon .NET Framework
ContainsType(Object,Boolean,Type[]) Method

The source object to match against.
if set to true the source object is cast as an System.Collections.IEnumerable object, and the actual matching is now done against the source objects within the collection against the target types specified.
The target types to be matched against.
Determines whether the specified source/collection of source object(s) contains one or more of the specified target types.
Syntax
'Declaration
 
Public Overloads Shared Function ContainsType( _
   ByVal source As Object, _
   ByVal treatSourceAsEnumerable As Boolean, _
   ByVal ParamArray targets() As Type _
) As Boolean
public static bool ContainsType( 
   object source,
   bool treatSourceAsEnumerable,
   params Type[] targets
)

Parameters

source
The source object to match against.
treatSourceAsEnumerable
if set to true the source object is cast as an System.Collections.IEnumerable object, and the actual matching is now done against the source objects within the collection against the target types specified.
targets
The target types to be matched against.

Return Value

true if the specified source contains one or more of the specified target types; otherwise, false.
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

TypeUtility Class
TypeUtility 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