AtomicComposition.TryGetValue 方法

定義

會得到方法保存的 SetValue(Object, Object) 值。

多載

名稱 Description
TryGetValue<T>(Object, T)

會得到方法保存的 SetValue(Object, Object) 值。

TryGetValue<T>(Object, Boolean, T)

會獲得方法儲存 SetValue(Object, Object) 的值,並可選擇不搜尋父交易。

TryGetValue<T>(Object, T)

會得到方法保存的 SetValue(Object, Object) 值。

public:
generic <typename T>
 bool TryGetValue(System::Object ^ key, [Runtime::InteropServices::Out] T % value);
public bool TryGetValue<T>(object key, out T value);
member this.TryGetValue : obj * 'T -> bool
Public Function TryGetValue(Of T) (key As Object, ByRef value As T) As Boolean

類型參數

T

要取的值型別。

參數

key
Object

鑰匙可以取回。

value
T

取回的值。

傳回

true若該值成功取得;否則,。 false

適用於

TryGetValue<T>(Object, Boolean, T)

會獲得方法儲存 SetValue(Object, Object) 的值,並可選擇不搜尋父交易。

public:
generic <typename T>
 bool TryGetValue(System::Object ^ key, bool localAtomicCompositionOnly, [Runtime::InteropServices::Out] T % value);
public bool TryGetValue<T>(object key, bool localAtomicCompositionOnly, out T value);
member this.TryGetValue : obj * bool * 'T -> bool
Public Function TryGetValue(Of T) (key As Object, localAtomicCompositionOnly As Boolean, ByRef value As T) As Boolean

類型參數

T

要取的值型別。

參數

key
Object

鑰匙可以取回。

localAtomicCompositionOnly
Boolean

true排除母體交易;否則,。 false

value
T

取回的值。

傳回

true若該值成功取得;否則,。 false

適用於