Exemplo n.º 1
0
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            if (destinationType != typeof(string) || value == null)
            {
                return(base.ConvertTo(context, culture, value, destinationType));
            }

            FieldInfo fieldInfo = UnderlyingType.GetField(value.ToString());

            return(GetDisplayName(fieldInfo));
        }