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
valuestring
Returns
implicit operator Unit(int)
Converts an int to a Unit object with type set to point.
public static implicit operator Unit(int value)
Parameters
valueint
Returns
implicit operator Unit(float)
Converts a float to a Unit object with type set to point.
public static implicit operator Unit(float value)
Parameters
valuefloat
Returns
implicit operator Unit(double)
Converts a double to a Unit object with type set to point.
public static implicit operator Unit(double value)
Parameters
valuedouble
Returns
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
valueUnit
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
valueUnit
Returns
- float