Click or drag to resize

SystemTypeToUsualType Function

X#
Calculate the Usual Type for a System Type

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax
 FUNCTION SystemTypeToUsualType(
	oType AS Type
) AS __UsualType
Request Example View Source

Parameters

oType
Type: Type
The type of the value to check

Return Value

Type: __UsualType
A value from the __UsualType enum
Remarks
You can use this function in assemblies that do not have a reference to XSharp.RT to determine the type of a value
Examples
This example converts a symbol that is passed inside an object to a string
X#
1if SystemTypeToUsualType(oOrder:GetType()) == __UsualType.Symbol
2   oOrder := oOrder:ToString()
3endif
See Also