This documentation is archived and is not being maintained.

UnitConverter Class

Converts a Unit to an object of another data type. It also converts an object of another data type to a Unit.

For a list of all members of this type, see UnitConverter Members.

System.Object
   System.ComponentModel.TypeConverter
      System.Web.UI.WebControls.UnitConverter

[Visual Basic]
Public Class UnitConverter
   Inherits TypeConverter
[C#]
public class UnitConverter : TypeConverter
[C++]
public __gc class UnitConverter : public TypeConverter
[JScript]
public class UnitConverter extends TypeConverter

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Remarks

Use the UnitConverter class to convert a Unit to an object of another data type. You can also use the UnitConverter class to convert an object of another data type to a Unit.

Note   This converter can only convert a string to Unit and a Unit to a string.
CAUTION   You should never access a type converter directly. Instead, call the appropriate converter by using System.ComponentModel.TypeDescriptor. For more information, see the examples in the System.ComponentModel.TypeConverter base class.

Requirements

Namespace: System.Web.UI.WebControls

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

Assembly: System.Web (in System.Web.dll)

See Also

UnitConverter Members | System.Web.UI.WebControls Namespace | Unit | System.ComponentModel.TypeDescriptor | System.ComponentModel.TypeConverter

Show: