派生クラスでオーバーライドされた場合、指定されたキーを持つ項目をコレクションで検索し、見つかった場合は返します。
名前空間: Microsoft.Windows.Design.Model
アセンブリ: Microsoft.Windows.Design.Interaction (Microsoft.Windows.Design.Interaction.dll 内)
構文
'宣言
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
パラメーター
- name
型: System.String
検索する項目のキー。
- throwOnError
型: System.Boolean
項目が見つからない場合に例外をスローする必要がある場合は true。それ以外の場合は false。
戻り値
型: TItemType
指定したキーを持つ TItemType。見つからない場合、このメソッドは、throwOnError に渡された値に応じて、例外をスローするか、または nullnull 参照 (Visual Basic では Nothing) を返します。
例外
例外 | 条件 |
---|---|
ArgumentException | name が見つからず、throwOnError が true です。 |
.NET Framework セキュリティ
- 直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「部分信頼コードからのライブラリの使用」を参照してください。
参照
参照
ModelMemberCollection<TItemType, TKeyType> クラス
Microsoft.Windows.Design.Model 名前空間