Пример #1
0
        public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
        {
            var s = value as string;

            if (s != null)
            {
                return(Mass.Parse(s, culture));
            }

            return(base.ConvertFrom(context, culture, value));
        }
Пример #2
0
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var s = value as string;

            return(Mass.Parse(s, culture));
        }