MarginsConverter.ConvertTo Method (ITypeDescriptorContext, CultureInfo, Object, Type)

 

Converts the given value object to the specified destination type using the specified context and arguments.

Namespace:   System.Drawing.Printing
Assembly:  System.Drawing (in System.Drawing.dll)

public override object ConvertTo(
	ITypeDescriptorContext context,
	CultureInfo culture,
	object value,
	Type destinationType
)

Parameters

context
Type: System.ComponentModel.ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

culture
Type: System.Globalization.CultureInfo

A CultureInfo that provides the language to convert to.

value
Type: System.Object

The Object to convert.

destinationType
Type: System.Type

The Type to which to convert the value.

Return Value

Type: System.Object

An Object that represents the converted value.

Exception Condition
ArgumentNullException

destinationType is null.

NotSupportedException

The conversion cannot be performed.

The context parameter can be used to extract additional information about the environment from which this converter is being invoked. This can be null, so always check. Also, properties on the context object can return null.

.NET Framework
Available since 1.1
Return to top
Show: