AnimatGuiCtrls.Controls.ExpandablePropBagConverter.ConvertTo C# (CSharp) Method

ConvertTo() public method

public ConvertTo ( ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType ) : object
context ITypeDescriptorContext
culture System.Globalization.CultureInfo
value object
destinationType System.Type
return object
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            if (value != null && destinationType == typeof(string))
            {
                if(value.GetType() == typeof(PropertyBag) || value.GetType() == typeof(PropertyTable))
                    return ((PropertyBag)value).GetPropertiesString();
                else
                    return base.ConvertTo(context, culture, value, destinationType);
                //return ((Class1)value).m_int1 + "," + ((Class1)value).m_int2;
            }
            return base.ConvertTo(context, culture, value, destinationType);
        }