ConversionAttempt Delegate

Represents a delegate for a type conversion attempt. A conversion can be registered by the RegisterConversion extension method.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0-preview.1
C#
public delegate bool ConversionAttempt(
	Object obj,
	Type targetType,
	CultureInfo? culture,
	out Object result
)

Parameters

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

Return Value

Boolean
if the conversion was successful; otherwise, .

See Also