public bool TryGetValue(
string key,
out TValue value
)Public Function TryGetValue (
key As String,
<OutAttribute> ByRef value As TValue
) As Booleanpublic:
virtual bool TryGetValue(
String^ key,
[OutAttribute] TValue% value
) sealedabstract TryGetValue :
key : string *
value : 'TValue byref -> bool
override TryGetValue :
key : string *
value : 'TValue byref -> bool If the key is not found, then the value parameter gets the appropriate default value for the type TValue; for example, 0 (zero) for integer types, for Boolean types, and for reference types.
This method approaches an O(1) operation.
| ArgumentNullException | key is . |