Click or drag to resize

ExtensionsTryCastT Method

Attempts to cast an object to a given type

Namespace:  Couchbase.Lite.Util
Assembly:  Couchbase.Lite (in Couchbase.Lite.dll) Version: 2.0.0-b0295
Syntax
C#
public static bool TryCast<T>(
	Object obj,
	out T castVal
)

Parameters

obj
Type: SystemObject
The object to operate on
castVal
Type: T
An out value containing the cast object

Type Parameters

T
The type to cast to

Return Value

Type: Boolean
true if the object was cast, otherwise false
See Also