/// <summary> /// Converts the given value object to the specified type, using the specified /// context and culture information. /// </summary> /// <param name="context">An <see cref="ITypeDescriptorContext"/> that provides a format context.</param> /// <param name="culture">The current culture.</param> /// <param name="value">The object to convert.</param> /// <param name="destinationType">The <see cref="Type"/> to convert the value parameter to.</param> /// <returns>The converted object.</returns> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="destinationType"/> is <see langword="null" />. /// </exception> /// <exception cref="NotSupportedException">The conversion cannot be performed.</exception> public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType != typeof(string)) { return(base.ConvertTo(context, culture, value, destinationType)); } var mru = value as MostRecentlyUsed; return(MostRecentlyUsed.Serialize(culture, mru)); }