Click or drag to resize

ExpressionHasImplicitConversion Method

Check if an implicit conversion will take place between the expression and its parent code object (Operator or VariableDecl). Conversions to type 'object' are not included, since there is no actual data conversion. The 'from' and 'to' types are returned whether an implicit conversion is available or not. Any applicable user-defined conversion method is returned.

Namespace:  Nova.CodeDOM
Assembly:  Nova.CodeDOM (in Nova.CodeDOM.dll) Version: 7.44.8391.13415
Syntax
C#
public bool HasImplicitConversion(
	out TypeRef fromTypeRef,
	out TypeRef toTypeRef,
	out Object userDefinedImplicitConversion
)

Parameters

fromTypeRef
Type: Nova.CodeDOMTypeRef
The source type of the implicit conversion (the evaluated type of the expression).
toTypeRef
Type: Nova.CodeDOMTypeRef
The target type of the implicit conversion.
userDefinedImplicitConversion
Type: SystemObject
The user-defined conversion operator method object, if any (ConversionOperatorDecl, MethodDefinition, or MethodInfo).

Return Value

Type: Boolean
True if an implicit conversion is needed, otherwise false (not needed, or not applicable).
See Also