ItemCollection.TryGetItem Método

Definição

Retorna um item fortemente tipado usando a identidade especificada dessa coleção de itens.Returns a strongly typed item by using the specified identity from this item collection.

Sobrecargas

TryGetItem<T>(String, T)

Retorna um objeto GlobalItem fortemente tipado usando a identidade especificada dessa coleção de itens.Returns a strongly typed GlobalItem object by using the specified identity from this item collection.

TryGetItem<T>(String, Boolean, T)

Retorna um objeto GlobalItem fortemente tipado usando a identidade especificada dessa coleção de itens.Returns a strongly typed GlobalItem object by using the specified identity from this item collection.

TryGetItem<T>(String, T)

Retorna um objeto GlobalItem fortemente tipado usando a identidade especificada dessa coleção de itens.Returns a strongly typed GlobalItem object by using the specified identity from this item collection.

public:
generic <typename T>
 where T : System::Data::Metadata::Edm::GlobalItem bool TryGetItem(System::String ^ identity, [Runtime::InteropServices::Out] T % item);
public bool TryGetItem<T> (string identity, out T item) where T : System.Data.Metadata.Edm.GlobalItem;
member this.TryGetItem : string * 'T -> bool (requires 'T :> System.Data.Metadata.Edm.GlobalItem)
Public Function TryGetItem(Of T As GlobalItem) (identity As String, ByRef item As T) As Boolean

Parâmetros de tipo

T

O tipo retornado pelo método.The type returned by the method.

Parâmetros

identity
String

A identidade do item.The identity of the item.

item
T

Quando esse método for retornado, o parâmetro de saída conterá um objeto GlobalItem.When this method returns, the output parameter contains a GlobalItem object. Se não houver nenhum item global com a identidade especificada na coleção de itens, esse parâmetro de saída conterá nulo.If there is no global item with the specified identity in the item collection, this output parameter contains null.

Retornos

Boolean

true se houver um item que corresponde aos critérios de pesquisa; caso contrário, false.true if there is an item that matches the search criteria; otherwise, false.

Aplica-se a

TryGetItem<T>(String, Boolean, T)

Retorna um objeto GlobalItem fortemente tipado usando a identidade especificada dessa coleção de itens.Returns a strongly typed GlobalItem object by using the specified identity from this item collection.

public:
generic <typename T>
 where T : System::Data::Metadata::Edm::GlobalItem bool TryGetItem(System::String ^ identity, bool ignoreCase, [Runtime::InteropServices::Out] T % item);
public bool TryGetItem<T> (string identity, bool ignoreCase, out T item) where T : System.Data.Metadata.Edm.GlobalItem;
member this.TryGetItem : string * bool * 'T -> bool (requires 'T :> System.Data.Metadata.Edm.GlobalItem)
Public Function TryGetItem(Of T As GlobalItem) (identity As String, ignoreCase As Boolean, ByRef item As T) As Boolean

Parâmetros de tipo

T

O tipo retornado pelo método.The type returned by the method.

Parâmetros

identity
String

A identidade do item.The identity of the item.

ignoreCase
Boolean

true para realizar a pesquisa que não diferencia maiúsculas de minúsculas; caso contrário, false.true to perform the case-insensitive search; otherwise, false.

item
T

Quando esse método for retornado, o parâmetro de saída conterá um objeto GlobalItem.When this method returns, the output parameter contains a GlobalItem object. Se não houver nenhum item global com a identidade especificada na coleção de itens, esse parâmetro de saída conterá nulo.If there is no global item with the specified identity in the item collection, this output parameter contains null.

Retornos

Boolean

true se houver um item que corresponde aos critérios de pesquisa; caso contrário, false.true if there is an item that matches the search criteria; otherwise, false.

Aplica-se a