| ActContextTryGetValueT Method (String, T) |
Gets the value associated with the specified name.
Namespace:
SmartTests
Assembly:
SmartTests (in SmartTests.dll) Version: 1.12.0
Syntax public bool TryGetValue<T>(
string name,
out T value
)
Public Function TryGetValue(Of T) (
name As String,
<OutAttribute> ByRef value As T
) As Boolean
public:
generic<typename T>
bool TryGetValue(
String^ name,
[OutAttribute] T% value
)
member TryGetValue :
name : string *
value : 'T byref -> bool
Parameters
- name
- Type: SystemString
The name of the value to get. - value
- Type: T
The value associated with the specified name.
If the specified name is not found, returns false and value is null.
Type Parameters
- T
- The type of the value of the specified name.
Return Value
Type:
Booleantrue if the context contains an element with the specified name; otherwise,
false.
Exceptions Remarks Do not use it directly. It is only useful for Smart Assertions development.
The best is to encapsulate this information using some extensions methods on this class; thus,
you have meaningful names and right types.
See Also