PostSharpAPI ReferencePost­Sharp.​SerializationValue­Type­Serializer<T>Convert
Open sandboxFocus

ValueTypeSerializer<T>.Convert Method

Convert(Object, Type)

Converts a value into a given target type.

Declaration
public virtual object Convert(object value, Type targetType)
Parameters
Type Name Description
Object value

Value to be converted.

System.Type targetType

target type.

Returns
Type Description
Object

The value converted to targetType.

Implements
ISerializer.Convert(Object, Type)
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.