Share via


ModelMemberCollection<TItemType, TKeyType>.Find Method (TKeyType, Boolean)

When overridden in a derived class, searches the collection for an item with the specified key and returns it if it is found.

Namespace:  Microsoft.Windows.Design.Model
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Protected MustOverride Function Find ( _
    value As TKeyType, _
    throwOnError As Boolean _
) As TItemType
protected abstract TItemType Find(
    TKeyType value,
    bool throwOnError
)
protected:
virtual TItemType Find(
    TKeyType value, 
    bool throwOnError
) abstract
abstract Find : 
        value:'TKeyType * 
        throwOnError:bool -> 'TItemType 
protected abstract function Find(
    value : TKeyType, 
    throwOnError : boolean
) : TItemType

Parameters

  • value
    Type: TKeyType
    The key of the item to find.
  • throwOnError
    Type: System.Boolean
    true if an exception should be thrown if the item is not found; otherwise, false.

Return Value

Type: TItemType
A TItemType with the specified key. If not found, this method throws an exception or returns nulla null reference (Nothing in Visual Basic), depending on the value passed to throwOnError.

Exceptions

Exception Condition
ArgumentException

value is not found and throwOnError is true.

.NET Framework Security

See Also

Reference

ModelMemberCollection<TItemType, TKeyType> Class

Find Overload

Microsoft.Windows.Design.Model Namespace

Other Resources

WPF Designer Extensibility