## Unit class

Provides the base class for units of measurement.

```csharp
public abstract class Unit : IEquatable<Unit>
```

## Properties

| Name | Description |
| --- | --- |
| [UnitType](../../aspose.html.drawing/unit/unittype/) { get; } | Gets the unit type of the `Unit`. |

## Methods

| Name | Description |
| --- | --- |
| override [Equals](../../aspose.html.drawing/unit/equals/#equals_1)(*object*) | Determines whether the specified Object, is equal to this instance. |
| virtual [Equals](../../aspose.html.drawing/unit/equals/#equals)(*Unit*) | Determines whether the specified `Unit`, is equal to this instance. |
| override [GetHashCode](../../aspose.html.drawing/unit/gethashcode/)() | Returns a hash code for this instance. |
| override [ToString](../../aspose.html.drawing/unit/tostring/)() | Returns a String that represents this instance. |
| static [FromCentimeters](../../aspose.html.drawing/unit/fromcentimeters/)(*double*) | Returns a [`Length`](../length/) object that is represented in centimeters. |
| static [FromDegrees](../../aspose.html.drawing/unit/fromdegrees/)(*double*) | Returns a [`Angle`](../angle/) object that is represented in degrees. |
| static [FromDotsPerCentimeters](../../aspose.html.drawing/unit/fromdotspercentimeters/)(*double*) | Returns a [`Resolution`](../resolution/) object that is represented in dots per centimeters. |
| static [FromDotsPerInch](../../aspose.html.drawing/unit/fromdotsperinch/)(*double*) | Returns a [`Resolution`](../resolution/) object that is represented in dots per inch. |
| static [FromDotsPerPixel](../../aspose.html.drawing/unit/fromdotsperpixel/)(*double*) | Returns a [`Resolution`](../resolution/) object that is represented in dots per pixels. |
| static [FromGradians](../../aspose.html.drawing/unit/fromgradians/)(*double*) | Returns a [`Angle`](../angle/) object that is represented in gradians. |
| static [FromHertz](../../aspose.html.drawing/unit/fromhertz/)(*double*) | Returns a [`Frequency`](../frequency/) object that is represented in hertz. |
| static [FromInches](../../aspose.html.drawing/unit/frominches/)(*double*) | Returns a [`Length`](../length/) object that is represented in inches. |
| static [FromKiloHertz](../../aspose.html.drawing/unit/fromkilohertz/)(*double*) | Returns a [`Frequency`](../frequency/) object that is represented in kiloHertz. |
| static [FromMillimeters](../../aspose.html.drawing/unit/frommillimeters/)(*double*) | Returns a [`Length`](../length/) object that is represented in millimeters. |
| static [FromMilliseconds](../../aspose.html.drawing/unit/frommilliseconds/)(*double*) | Returns a [`Time`](../time/) object that is represented in milliseconds. |
| static [FromPicas](../../aspose.html.drawing/unit/frompicas/)(*double*) | Returns a [`Length`](../length/) object that is represented in picas. |
| static [FromPixels](../../aspose.html.drawing/unit/frompixels/)(*double*) | Returns a [`Length`](../length/) object that is represented in pixels. |
| static [FromPoints](../../aspose.html.drawing/unit/frompoints/)(*double*) | Returns a [`Length`](../length/) object that is represented in points. |
| static [FromQuarterMillimeters](../../aspose.html.drawing/unit/fromquartermillimeters/)(*double*) | Returns a [`Length`](../length/) object that is represented in quarter-millimeters. |
| static [FromRadians](../../aspose.html.drawing/unit/fromradians/)(*double*) | Returns a [`Angle`](../angle/) object that is represented in radians. |
| static [FromSeconds](../../aspose.html.drawing/unit/fromseconds/)(*double*) | Returns a [`Time`](../time/) object that is represented in seconds. |
| static [FromTurns](../../aspose.html.drawing/unit/fromturns/)(*double*) | Returns a [`Angle`](../angle/) object that is represented in turns. |

### See Also

* namespace [Aspose.Html.Drawing](../../aspose.html.drawing/)
* assembly [Aspose.HTML](../../)
