Metalama 1.0 / / Metalama Documentation / Aspect API / Metalama.​Framework.​Serialization / Value­Type­Serializer<T> / Convert

Method Convert

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.

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.