ToString(IFormatProvider) Method
Converts the value of this instance to its equivalent string representation using the specified format.
Parameters
- provider
- An System.IFormatProvider object supplying the culture-specific formatting information.
Return Value
A
System.String value indicating the current
Length instance.
var length = new Length("1in");
string result = length.ToString(CultureInfo.InvariantCulture); // "1in"