Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

CollectionUtils.FindValueOfType(ICollection, Type) Method

Find a value of one of the given types in the given Collection, searching the Collection for a value of the first type, then searching for a value of the second type, etc.

[Visual Basic]
Public Overloads Shared Sub FindValueOfType( _
   ByVal collection As ICollection, _
   ByVal types As Type _
)
[C#]
public static object FindValueOfType(
   ICollection collection,
   Type[] types
);

Parameters

collection
The collection to search.
types
The types to look for, in prioritized order.

Return Value

a value of the given types found, or

null
if none

Exceptions

Exception Type Condition
ArgumentException If more than one value of the given type is found

See Also

CollectionUtils Class | Spring.Util Namespace | CollectionUtils.FindValueOfType Overload List