Table of Contents

Operator implicit operator

Namespace
MigraDoc.DocumentObjectModel
Assembly
MigraDoc.DocumentObjectModel.dll

implicit operator Unit(string?)

Converts a string to a Unit object. If the string contains a suffix like 'cm' or 'in' the object will be converted to the appropriate type, otherwise point is assumed.

public static implicit operator Unit(string? value)

Parameters

value string

Returns

Unit

implicit operator Unit(int)

Converts an int to a Unit object with type set to point.

public static implicit operator Unit(int value)

Parameters

value int

Returns

Unit

implicit operator Unit(float)

Converts a float to a Unit object with type set to point.

public static implicit operator Unit(float value)

Parameters

value float

Returns

Unit

implicit operator Unit(double)

Converts a double to a Unit object with type set to point.

public static implicit operator Unit(double value)

Parameters

value double

Returns

Unit

implicit operator double(Unit)

Returns a double value as point.

[Obsolete("Implicit conversion to double is obsolete, because it led to misunderstandings and unexpected behavior. Use e. g. the Point property instead.")]
public static implicit operator double(Unit value)

Parameters

value Unit

Returns

double

implicit operator float(Unit)

Returns a float value as point.

[Obsolete("Implicit conversion to float is obsolete, because it led to misunderstandings and unexpected behavior. Use e. g. the Point property instead.")]
public static implicit operator float(Unit value)

Parameters

value Unit

Returns

float