PostSharp 6.10 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Serialization Namespace / ISerializer Interface / ISerializer Methods / ISerializer.​Convert Method

ISerializer.Convert Method

Converts a value into a given target type.

Namespace:  PostSharp.Serialization
Assembly:  PostSharp (in PostSharp.dll) Version: 6.10.10.0 (6.10.10.0)
Syntax
C#
Object Convert(
	Object value,
	Type targetType
)

Parameters

value
Type: System.Object
Value to be converted.
targetType
Type: System.Type
target type.

Return Value

Type: Object
The value converted to targetType.
Remarks

This method allows for additional flexibility if the serialization-time type is not equal to the deserialization-time. The current method is invoked at deserialization time to perform the conversion.

See Also