Unit

Unit class

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

public sealed class Unit

Properties

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

Methods

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.

Examples

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

[C#]
  using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.Code128))
  {
      generator.Parameters.Barcode.BarHeight.Millimeters = 10;
      generator.Save("test.png");
  }

See Also