Target Type DictionaryTry Get Value(String, Target) Method
Gets the value associated with the specified key.
Definition
Namespace: Sandcastle.Tools.BuildComponents.Targets
Assembly: Sandcastle.Tools.BuildComponents (in Sandcastle.Tools.BuildComponents.dll) Version: 2026.1.20.0
if the object that implements IDictionaryTKey, TValue contains an element with the specified key; otherwise, .
Assembly: Sandcastle.Tools.BuildComponents (in Sandcastle.Tools.BuildComponents.dll) Version: 2026.1.20.0
C#
public bool TryGetValue(
string key,
out Target value
)VB
Public Function TryGetValue (
key As String,
<OutAttribute> ByRef value As Target
) As BooleanC++
public:
virtual bool TryGetValue(
String^ key,
[OutAttribute] Target^% value
) sealedF#
abstract TryGetValue :
key : string *
value : Target byref -> bool
override TryGetValue :
key : string *
value : Target byref -> bool Parameters
- key String
- The key whose value to get.
- value Target
- When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.
Return Value
Booleanif the object that implements IDictionaryTKey, TValue contains an element with the specified key; otherwise, .
Implements
IDictionaryTKey, TValueTryGetValue(TKey, TValue)Exceptions
| ArgumentNullException | key is . |