ItemCollection.TryGetItem 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| TryGetItem<T>(String, T) |
通过使用此项集合中的指定标识返回强类型 GlobalItem 对象。 |
| TryGetItem<T>(String, Boolean, T) |
通过使用此项集合中的指定标识返回强类型 GlobalItem 对象。 |
TryGetItem<T>(String, T)
通过使用此项集合中的指定标识返回强类型 GlobalItem 对象。
public bool TryGetItem<T>(string identity, out T item) where T : System.Data.Entity.Core.Metadata.Edm.GlobalItem;
member this.TryGetItem : string * -> bool (requires 'T :> System.Data.Entity.Core.Metadata.Edm.GlobalItem)
Public Function TryGetItem(Of T As GlobalItem) (identity As String, ByRef item As T) As Boolean
类型参数
- T
方法返回的类型。
参数
- identity
- String
项的标识。
- item
- T
此方法返回时,输出参数包含一个 GlobalItem 对象。 如果项集合中没有具有指定标识的全局项,则此输出参数包含 null。
返回
如果存在与搜索条件匹配的项,则为 true;否则为 false。
适用于
TryGetItem<T>(String, Boolean, T)
通过使用此项集合中的指定标识返回强类型 GlobalItem 对象。
public bool TryGetItem<T>(string identity, bool ignoreCase, out T item) where T : System.Data.Entity.Core.Metadata.Edm.GlobalItem;
member this.TryGetItem : string * bool * -> bool (requires 'T :> System.Data.Entity.Core.Metadata.Edm.GlobalItem)
Public Function TryGetItem(Of T As GlobalItem) (identity As String, ignoreCase As Boolean, ByRef item As T) As Boolean
类型参数
- T
方法返回的类型。
参数
- identity
- String
项的标识。
- ignoreCase
- Boolean
若要执行不区分大小写的搜索,则为 true;否则为 false。
- item
- T
此方法返回时,输出参数包含一个 GlobalItem 对象。 如果项集合中没有具有指定标识的全局项,则此输出参数包含 null。
返回
如果存在与搜索条件匹配的项,则为 true;否则为 false。