KGy SOFT

ConversionAttempt Delegate

KGy SOFT Core Libraries Help
Represents a delegate for a type conversion attempt. A conversion can be registered by the RegisterConversion extension method.

Namespace:  KGySoft.CoreLibraries
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0-rc.1
Syntax

public delegate bool ConversionAttempt(
	Object obj,
	Type targetType,
	CultureInfo culture,
	out Object result
)

Parameters

obj
Type: SystemObject
The source object to convert.
targetType
Type: SystemType
The desired type of the result parameter if the return value is .
culture
Type: System.GlobalizationCultureInfo
The used culture for the conversion. If , then the conversion must use culture invariant conversion.
result
Type: SystemObject
The result if the return value is .

Return Value

Type: Boolean
 if the conversion was successful; otherwise, .
See Also

Reference