AtomicComposition.TryGetValue Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value saved by the SetValue(Object, Object) method.
TryGetValue<T>(Object, T) |
Gets a value saved by the SetValue(Object, Object) method. |
TryGetValue<T>(Object, Boolean, T) |
Gets a value saved by the SetValue(Object, Object) method, with the option of not searching parent transactions. |
- Source:
- AtomicComposition.cs
- Source:
- AtomicComposition.cs
- Source:
- AtomicComposition.cs
Gets a value saved by the SetValue(Object, Object) method.
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
Type Parameters
- T
The type of the value to be retrieved.
Parameters
- key
- Object
The key to retrieve from.
- value
- T
The retrieved value.
Returns
true
if the value was successfully retrieved; otherwise, false
.
Applies to
.NET 9 (package-provided) and other versions
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
- Source:
- AtomicComposition.cs
- Source:
- AtomicComposition.cs
- Source:
- AtomicComposition.cs
Gets a value saved by the SetValue(Object, Object) method, with the option of not searching parent transactions.
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
Type Parameters
- T
The type of the value to be retrieved.
Parameters
- key
- Object
The key to retrieve from.
- localAtomicCompositionOnly
- Boolean
true
to exclude parent transactions; otherwise, false
.
- value
- T
The retrieved value.
Returns
true
if the value was successfully retrieved; otherwise, false
.
Applies to
.NET 9 (package-provided) and other versions
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: