Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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.


[Visual Basic]
Public Class UnitConverter
   Inherits TypeConverter
public class UnitConverter : TypeConverter
public __gc class UnitConverter : public TypeConverter
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.


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.


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

© 2016 Microsoft