Click or drag to resize

TypeExtensionsCast Method

[This is preliminary documentation and is subject to change.]

Attempts to cast an object to the provided type

Namespace:  CSInfrastructure.Extensions
Assembly:  CSInfrastructure (in CSInfrastructure.dll) Version: 1.13.0+Branch.master.Sha.d583fc64569355d188a9c0818d257b6d0d3e1339
Syntax
C#
public static Object Cast(
	this Type type,
	Object data
)

Parameters

type
Type: SystemType
The type to cast to
data
Type: SystemObject
The object to cast

Return Value

Type: Object
data casted to type type, but as an object

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Type. 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