VDocs.NET
Back to DOM

DOM.MeasurementUnits.Percentage

Namespace: DOM.MeasurementUnits

Represents a percentage-style measurement used for relative document values.

Instances either hold a nullable absolute percentage value (in theproperty) or an unspecified (null) state. The class provides implicit conversions from numeric types to make creating percentage values concise. Numeric inputs are clamped by theextension to a safe range before being stored. Note: The concrete range used by the conversion is determined by the call toin the implicit operators and constructors. Consumers should be aware that values will be clamped to that range.

7 members

Constructors

Percentage

3 overloads
Percentage()

Initializes a newinstance with no value set.

The resulting instance represents an unspecified percentage (i.e.,is).

Percentage(int value)

Initializes a newinstance from an integer value.

Parameters

value
Percentage value to assign. The value is clamped to the rangeto.
Percentage(double value)

Initializes a newinstance from a double value.

Parameters

value
Percentage value to assign. The value is clamped to the rangeto.

Properties

Valuedouble

Gets or sets the percentage value.

Methods

op_Implicit

2 overloads
Percentage op_Implicit(System.Double)~DOM.MeasurementUnits.Percentage

Implicitly converts ato a.

The input value is clamped to the rangetousing.

Parameters

value
Input percentage value to convert.

Returns

Percentage

A newwhosecontains the clamped value.

Percentage op_Implicit(System.Int32)~DOM.MeasurementUnits.Percentage

Implicitly converts anto a.

The input value is clamped to the rangetousing.

Parameters

value
Input percentage value to convert.

Returns

Percentage

A newwhosecontains the clamped value.

ToString

ToString

Returns a string representation of the stored percentage value.

Returns

Theformatted using the defaultbehavior, or an empty string ifis.

VDocs.NET
The .NET Word Document Library

Generate Word
documents.
Not XML.

Create professional documents in .NET without the complexity of OpenXML or Word Interop.

C#VB.NET
var doc = new WordDocument();

doc.AddParagraph()
   .AddText("Invoice")
   .SetHeading(HeadingLevel.Title);

doc.Save("invoice.docx");

Create Account

Create your VDocs account.

or

Already have an account? Sign in