Share via


ModelMemberCollection<TItemType, TKeyType>.Find Method (String, 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 ( _
    name As String, _
    throwOnError As Boolean _
) As TItemType
protected abstract TItemType Find(
    string name,
    bool throwOnError
)
protected:
virtual TItemType Find(
    String^ name, 
    bool throwOnError
) abstract
abstract Find : 
        name:string * 
        throwOnError:bool -> 'TItemType 
protected abstract function Find(
    name : String, 
    throwOnError : boolean
) : TItemType

Parameters

  • 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

name 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