Couchbase Lite .NET Documentation
Couchbase Lite .NET Documentation
Couchbase.Lite.Util
Extensions Class
Extensions Methods
TryGetValue Method
TryGetValue(T) Method (IDictionary(String, Object), String, T)
TryGetValue(T) Method (IReadOnlyDictionary(String, Object), String, T)
Extensions
TryGetValue
T
Method (IDictionary
String, Object
, String,
T
)
Tries to get the value for the given key as the given type
Namespace:
Couchbase.Lite.Util
Assembly:
Couchbase.Lite (in Couchbase.Lite.dll) Version: 2.0.0-b0125
Syntax
C#
Copy
public
static
bool
TryGetValue
<T>(
this
IDictionary
<
string
,
Object
>
dic
,
string
key
,
out
T
value
)
Parameters
dic
Type:
System.Collections.Generic
IDictionary
String
,
Object
The dictionary to operate on (implicit)
key
Type:
System
String
The key to attempt to retrieve the value for
value
Type:
T
The out parameter containing the cast value
Type Parameters
T
The type to get the value as
Return Value
Type:
Boolean
true
if the value was found and cast,
false
otherwise
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IDictionary
String
,
Object
. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic)
or
Extension Methods (C# Programming Guide)
.
See Also
Reference
Extensions Class
TryGetValue Overload
Couchbase.Lite.Util Namespace