Name

BaseNumberConverter

Synopsis

This abstract class provides a base for TypeConverter implementations that translates integer numeric types (such as int).

It also provides an implementation that converts string objects, including those with hexadecimal representations.


public abstract class BaseNumberConverter : TypeConverter {

// Protected Constructors

   protected BaseNumberConverter();

// Public Instance Methods

   public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType);  // overrides TypeConverter

   public override bool CanConvertTo(ITypeDescriptorContext context, Type t);  // overrides TypeConverter

   public override object ConvertFrom(ITypeDescriptorContext context, 

        System.Globalization.CultureInfo culture, object value);  // overrides TypeConverter

   public override object ConvertTo(ITypeDescriptorContext context,

        System.Globalization.CultureInfo culture, object value, Type destinationType);  // overrides TypeConverter

}

Hierarchy

System.Object TypeConverter BaseNumberConverter

Subclasses

ByteConverter, DecimalConverter, DoubleConverter, Int16Converter, Int32Converter, Int64Converter, SByteConverter, SingleConverter, UInt16Converter, UInt32Converter, UInt64Converter

Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.