PropertyGridSample/Unit.cs
/// <summary>
/// Converts the value of this instance to an <see cref="T:System.Object" /> of the specified <see cref="T:System.Type" />
/// that has an equivalent value, using the specified culture-specific formatting information.
/// </summary>
/// <param name="conversionType">The <see cref="T:System.Type" /> to which the value of this instance is converted.</param>
/// <param name="provider">
/// An <see cref="T:System.IFormatProvider" /> interface implementation that supplies culture-specific formatting information.
/// </param>
/// <returns>
/// An <see cref="T:System.Object" /> instance of type <paramref name="conversionType" /> whose value is equivalent to the
/// value of this instance.
/// </returns>
Converts the value of this instance to an  of the specified
that has an equivalent value, using the specified culture-specific formatting information.
Converts the value of this instance to an of the specified that has an equivalent value using the specified culture - specific formatting information .
public object ToType(Type conversionType, IFormatProvider provider)
        {
            if (conversionType == typeof(string))
            {
                return ToString(provider);
            }
            if (conversionType == typeof(double))
            {
                return ToDouble(provider);
            }
            return null;
        }
public object ToType ( Type conversionType , IFormatProvider provider ) { if ( conversionType == typeof ( string ) ) { return ToString ( provider ) ; } if ( conversionType == typeof ( double ) ) { return ToDouble ( provider ) ; } return null ; }
Converts the value of this instance to an  of the specified
that has an equivalent value, using the specified culture-specific formatting information.
Converts the value of this instance to an of the specified that has an equivalent value using the specified culture - specific formatting information .
An  instance of type  whose value is equivalent to the
value of this instance.
An instance of type whose value is equivalent to the value of this instance .
conversionType
Type
The  to which the value of this instance is converted.
The to which the value of this instance is converted .
provider
IFormatProvider
An  interface implementation that supplies culture-specific formatting information.
An interface implementation that supplies culture - specific formatting information .