Unit class

Specifies the size value in different units (Pixel, Inches, etc.).

public sealed class Unit


Name Description
Document { get; set; } Gets or sets size value in document units.
Inches { get; set; } Gets or sets size value in inches.
Millimeters { get; set; } Gets or sets size value in millimeters.
Pixels { get; set; } Gets or sets size value in pixels.
Point { get; set; } Gets or sets size value in point.
Resolution { get; } Resolution


Name Description
override Equals(object) Determines whether this instance and a specified object, which must also be a Unit object, have the same value.
override GetHashCode() Returns the hash code for this object.
override ToString() Returns a human-readable string representation of this Unit.


This sample shows how to create and save a BarCode image.

  using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.Code128))
      generator.Parameters.Barcode.BarHeight.Millimeters = 10;

See Also