This documentation is archived and is not being maintained.

Unit Members

Unit overview

Public Constructors

public constructorUnit Constructor Overloaded. Initializes a new instance of the Unit structure.

Public Fields

public fieldstatic (Shared in Visual Basic)Empty Represents an empty Unit. This field is read-only.

Public Properties

public propertyIsEmpty Gets a value indicating whether the Unit is empty.
public propertyType Gets the unit type of the Unit.
public propertyValue Gets the length of the Unit.

Public Methods

public methodEquals Overridden. Compares this Unit with the specified object.
public methodGetHashCode Overridden. See ValueType.GetHashCode.
public methodGetType (inherited from Object) Gets the Type of the current instance.
public methodstatic (Shared in Visual Basic)Parse Overloaded. Converts a string to a Unit.
public methodstatic (Shared in Visual Basic)Percentage Creates a Unit of type Percentage from the specified double precision floating point number.
public methodstatic (Shared in Visual Basic)Pixel Creates a Unit of type Pixel from the specified 32-bit signed integer.
public methodstatic (Shared in Visual Basic)Point Creates a Unit of type Point from the specified 32-bit signed integer.
public methodToString Overloaded. Converts a Unit to a string equivalent.

Public Operators and Type Conversions

public operatorstatic (Shared in Visual Basic)Equality Operator Compares two Unit objects to determine whether they are equal.
public operatorstatic (Shared in Visual Basic)Inequality Operator Compares two Unit objects to determine whether they are not equal.
public operatorstatic (Shared in Visual Basic)Int32 to Unit Conversion Implicitly creates a Unit of type Pixel from the specified 32-bit unsigned integer.

Protected Methods

protected methodFinalize (inherited from Object) Overridden. Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodMemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

Unit Structure | System.Web.UI.WebControls Namespace

Show: