BsonTrieTValueTryGetValue Method (String, TValue) |
Gets the value associated with the specified element name.
Namespace:
MongoDB.Bson.IO
Assembly:
MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax public bool TryGetValue(
string elementName,
out TValue value
)
Public Function TryGetValue (
elementName As String,
<OutAttribute> ByRef value As TValue
) As Boolean
member TryGetValue :
elementName : string *
value : 'TValue byref -> bool
Parameters
- elementName
- Type: SystemString
The element name. - value
- Type: TValue
When this method returns, contains the value associated with the specified element name, if the key is found;
otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.
Return Value
Type:
BooleanTrue if the value was found; otherwise, false.
See Also