SuperMap.WindowsPhone.Core.Rectangle2DConverter.ConvertTo C# (CSharp) Méthode

ConvertTo() public méthode

${WP_core_Rectangle2DConverter_method_ConvertTo_D}
public ConvertTo ( ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType ) : object
context ITypeDescriptorContext ${WP_core_Rectangle2DConverter_method_ConvertTo_param_context}
culture System.Globalization.CultureInfo ${WP_core_Rectangle2DConverter_method_ConvertTo_param_culture}
value object ${WP_core_Rectangle2DConverter_method_ConvertTo_param_value}
destinationType System.Type ${WP_core_Rectangle2DConverter_method_ConvertTo_param_destinationType}
Résultat object
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            if (destinationType == null)
            {
                throw new ArgumentNullException("destinationType");
            }

            if ((destinationType == typeof(string)) && (value is Rectangle2D))
            {
                return convertToString((Rectangle2D)value);
            }

            return base.ConvertTo(context, culture, value, destinationType);

        }