TypeConverter.ConvertToInvariantString TypeConverter.ConvertToInvariantString TypeConverter.ConvertToInvariantString TypeConverter.ConvertToInvariantString Method

Definition

Converts the specified value to a culture-invariant string representation.

Overloads

ConvertToInvariantString(Object) ConvertToInvariantString(Object) ConvertToInvariantString(Object) ConvertToInvariantString(Object)

Converts the specified value to a culture-invariant string representation.

ConvertToInvariantString(ITypeDescriptorContext, Object) ConvertToInvariantString(ITypeDescriptorContext, Object) ConvertToInvariantString(ITypeDescriptorContext, Object) ConvertToInvariantString(ITypeDescriptorContext, Object)

Converts the specified value to a culture-invariant string representation, using the specified context.

ConvertToInvariantString(Object) ConvertToInvariantString(Object) ConvertToInvariantString(Object) ConvertToInvariantString(Object)

Converts the specified value to a culture-invariant string representation.

public:
 System::String ^ ConvertToInvariantString(System::Object ^ value);
public string ConvertToInvariantString (object value);
member this.ConvertToInvariantString : obj -> string
Public Function ConvertToInvariantString (value As Object) As String
Parameters
value
Object Object Object Object

The Object to convert.

Returns

A String that represents the converted value.

Exceptions

Remarks

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.

Depending on the implementation of the value formatter, it might be possible to pass the returned string back into the value formatter to re-create an instance of the object.

See Also

ConvertToInvariantString(ITypeDescriptorContext, Object) ConvertToInvariantString(ITypeDescriptorContext, Object) ConvertToInvariantString(ITypeDescriptorContext, Object) ConvertToInvariantString(ITypeDescriptorContext, Object)

Converts the specified value to a culture-invariant string representation, using the specified context.

public:
 System::String ^ ConvertToInvariantString(System::ComponentModel::ITypeDescriptorContext ^ context, System::Object ^ value);
public string ConvertToInvariantString (System.ComponentModel.ITypeDescriptorContext context, object value);
member this.ConvertToInvariantString : System.ComponentModel.ITypeDescriptorContext * obj -> string
Public Function ConvertToInvariantString (context As ITypeDescriptorContext, value As Object) As String
Parameters
value
Object Object Object Object

The Object to convert.

Returns

A String that represents the converted value.

Exceptions

Remarks

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

Depending on the implementation of the value formatter, it might be possible to pass the returned string back into the value formatter to re-create an instance of the object.

See Also

Applies to