AngleSharp by AngleSharp

<PackageReference Include="AngleSharp" Version="0.9.7" />

 Resolution

Represents a resolution value.
public enum Unit

The various resolution units.

public Unit Type { get; }

Gets the type of the length.

public string UnitString { get; }

Gets the representation of the unit as a string.

public float Value { get; }

Gets the value of resolution.

public Resolution(float value, Unit unit)

Creates a new resolution value.

public static Unit GetUnit(string s)

Gets the unit from the enumeration for the provided string.

public static bool TryParse(string s, out Resolution result)

Tries to convert the given string to a Resolution.

public int CompareTo(Resolution other)

Compares the current resolution against the given one.

public bool Equals(Resolution other)

Checks if the current resolution equals the given one.

public float To(Unit unit)

Converts the resolution to the given unit.

public float ToDotsPerPixel()

Converts the resolution to a per pixel density.

public string ToString(string format, IFormatProvider formatProvider)

Returns a formatted string representing the resolution.