Share via


Converter<TInput, TOutput> Delegate

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Represents a method that converts an object from one type to another type.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Delegate Function Converter(Of In TInput, Out TOutput) ( _
    input As TInput _
) As TOutput
public delegate TOutput Converter<in TInput, out TOutput>(
    TInput input
)

Type Parameters

  • inTInput
    The type of object that is to be converted.

    This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. For more information about covariance and contravariance, see 2678dc63-c7f9-4590-9ddc-0a4df684d42e.

  • outTOutput
    The type the input object is to be converted to.

    This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see 2678dc63-c7f9-4590-9ddc-0a4df684d42e.

Parameters

  • input
    Type: TInput
    The object to convert.

Return Value

Type: TOutput
The TOutput that represents the converted TInput.
None of the methods in the .NET Framework for Silverlight class library have a Converter<TInput, TOutput> delegate as a parameter. The Converter<TInput, TOutput> delegate exists primarily to support the infrastructure, but you can still use it to create custom methods that use converters.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference