Table of Contents

Method ToString

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

ToString(object?, object)

Converts the value to its equivalent string representation.

string? ToString(object? sender, object value)

Parameters

sender object

An object which calls the converter.

value object

A value for convertion.

Returns

string

The string representation of the value.

ToString(object?, object, IFormatProvider?)

Converts the value to its equivalent string representation using the specified culture-specific format information.

string? ToString(object? sender, object value, IFormatProvider? provider)

Parameters

sender object

An object which calls the converter.

value object

A value for convertion.

provider IFormatProvider

An object that supplies culture-specific formatting information.

Returns

string

The string representation of the value as specified by provider.

ToString(object?, object, string?)

Converts the value to its equivalent string representation, using the specified format.

string? ToString(object? sender, object value, string? format)

Parameters

sender object

An object which calls the converter.

value object

A value for convertion.

format string

A standard or custom format string.

Returns

string

The string representation of the value as specified by format.

ToString(object?, object, string?, IFormatProvider?)

Converts the value to its equivalent string representation using the specified format and culture-specific format information.

string? ToString(object? sender, object value, string? format, IFormatProvider? provider)

Parameters

sender object

An object which calls the converter.

value object

A value for convertion.

format string

A standard or custom format string.

provider IFormatProvider

An object that supplies culture-specific formatting information.

Returns

string

The string representation of the value as specified by format and provider.

ToString(object?, object, ITypeDescriptorContext?, CultureInfo?, bool)

Converts the value to its equivalent string representation, using the specified context and culture information.

string? ToString(object? sender, object value, ITypeDescriptorContext? context, CultureInfo? culture, bool useInvariantCulture)

Parameters

sender object

An object which calls the converter.

value object

A value for convertion.

context ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

culture CultureInfo

CultureInfo used for the conversion. If null is passed, the current culture is assumed.

useInvariantCulture bool

Whether to use invariant culture for the conversion.

Returns

string