Click or drag to resize
weroSoft AG, Software
TypeManagerHelperDynamicCast Method
The documentation is integral part of the weroSoft product documentation. This part is intended to be used by developers only.
Dynamically casts a reference to another type.

Namespace:  WeroSoft.ComponentModel.TypeResolving
Assembly:  WeroSoft.Core.Library (in WeroSoft.Core.Library.dll) Version: 3.0 Pre-Release
public static Object DynamicCast(
	this Object referenceToCast,
	Type targetType


Type: SystemObject
Reference which has to be casted.
Type: SystemType
Target type to cast.

Return Value

Type: Object
Casted reference or null if cast was not successful.

Usage Note

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