Unit Class

Represents a metric unit.

Definition

Namespace: DevCase.Core.Math.Science
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[SerializableAttribute]
public sealed class Unit : IComparable, IComparable<Unit>, 
	IEquatable<Unit>, IFormattable
Inheritance
Object    Unit
Implements
IComparable, IComparableUnit, IEquatableUnit, IFormattable

Constructors

Unit(String, String, MetricUnitType) Initializes a new instance of the Unit class.
Unit(String, String, Unit) Initializes a new instance of the Unit class.
Unit(String, String, MetricUnitType, UnitConversion) Initializes a new instance of the Unit class.
Unit(String, String, Unit, UnitConversion) Initializes a new instance of the Unit class.

Properties

Conversions Gets an array of UnitConversion containing conversion functions between this Unit and another.
Factor Gets the factor of the unit.
Name Gets the name of the unit.
Symbol Gets the symbol of the unit.
UnitType Gets the type of the unit.

Methods

Equals(Object) Determines whether the specified Object is equal to this instance.
(Overrides ObjectEquals(Object))
Equals(Unit) Determines whether the specified Unit is equal to this instance.
GetHashCode Returns a hash code for this instance.
(Overrides ObjectGetHashCode)
GetType Gets the Type of the current instance.
(Inherited from Object)
IsCompatibleWith Determines whether the specified Unit is compatible with this one.
Power Raises the current Unit to the specified power.

I.e. Units.Length.Metre.Power(3) would return a cubic metre unit.

ToString Returns a string representation of this Unit.
(Overrides ObjectToString)
ToString(IFormatProvider) Returns a string representation of this Unit.
ToString(String) Returns a string representation of this Unit.
ToString(String, IFormatProvider) Returns a string representation of this Unit.

Operators

Division(Double, Unit) Implements the operator /
Division(Unit, Unit) Implements the operator /
Division(Unit, Double) Implements the operator /
Equality(Unit, Unit) Implements the operator =
Exponent(Double, Unit) Implements the operator ^
Exponent(Unit, Unit) Implements the operator ^
Exponent(Unit, Double) Implements the operator ^
Inequality(Unit, Unit) Implements the operator <>
Multiply(Double, Unit) Implements the operator *
Multiply(Unit, Unit) Implements the operator *
Multiply(Unit, Double) Implements the operator *

Extension Methods

CanConvertTo Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
CanConvertToT Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
ConvertToT Converts an object to the specified target type.

If the conversion fails, an exception is thrown.
(Defined by ObjectExtensions)

ConvertToT Converts an object to the specified target type.

If the conversion fails, returns the specified default value.
(Defined by ObjectExtensions)

IsDisposable Determines whether the specified object is a disposable type (i.e., it implements IDisposable interface).
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
ThrowIfNullTException Throws the specified exception if the source object is null.
(Defined by ObjectExtensions)

See Also