Click or drag to resize

ExtensionsCastOrDefaultT Method (Object)

Attempts to cast an object to a given type, and returning a compiler default value if not successful

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

Parameters

obj
Type: SystemObject
The object to cast

Type Parameters

T
The type to cast the object to

Return Value

Type: T
The cast object, or the compiler default value if not successful
See Also