Show / Hide Table of Contents

Class LinearUnitFormat

Utility methods to format a decimal number to its different string representations.

Inheritance
System.Object
LinearUnitFormat
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: netDxf.Units
Assembly: CADability.dll
Syntax
public static class LinearUnitFormat

Methods

| Improve this Doc View Source

ToArchitectural(Double, UnitStyleFormat)

Converts a length value into its feet and fractional inches string representation.

Declaration
public static string ToArchitectural(double length, UnitStyleFormat format)
Parameters
Type Name Description
System.Double length

The length value.

UnitStyleFormat format

The unit style format.

Returns
Type Description
System.String

A string that represents the length in feet and fractional inches.

Remarks

The Architectural format assumes that each drawing unit represents one inch.

| Improve this Doc View Source

ToDecimal(Double, UnitStyleFormat)

Converts a length value into its decimal string representation.

Declaration
public static string ToDecimal(double length, UnitStyleFormat format)
Parameters
Type Name Description
System.Double length

The length value.

UnitStyleFormat format

The unit style format.

Returns
Type Description
System.String

A string that represents the length in decimal units.

| Improve this Doc View Source

ToEngineering(Double, UnitStyleFormat)

Converts a length value into its feet and decimal inches string representation.

Declaration
public static string ToEngineering(double length, UnitStyleFormat format)
Parameters
Type Name Description
System.Double length

The length value.

UnitStyleFormat format

The unit style format.

Returns
Type Description
System.String

A string that represents the length in feet and decimal inches.

Remarks

The Engineering format assumes that each drawing unit represents one inch.

| Improve this Doc View Source

ToFractional(Double, UnitStyleFormat)

Converts a length value into its fractional string representation.

Declaration
public static string ToFractional(double length, UnitStyleFormat format)
Parameters
Type Name Description
System.Double length

The length value.

UnitStyleFormat format

The unit style format.

Returns
Type Description
System.String

A string that represents the length in fractional units.

| Improve this Doc View Source

ToScientific(Double, UnitStyleFormat)

Converts a length value into its scientific string representation.

Declaration
public static string ToScientific(double length, UnitStyleFormat format)
Parameters
Type Name Description
System.Double length

The length value.

UnitStyleFormat format

The unit style format.

Returns
Type Description
System.String

A string that represents the length in scientific units.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX