Current Structure

Represents an electric current measurement, in amperes, as a double-precision floating-point number.

Definition

Namespace: Gemstone.Units
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
[SerializableAttribute]
public struct Current : IComparable, IFormattable, 
	IConvertible, IComparable<Current>, IComparable<double>, IEquatable<Current>, 
	IEquatable<double>
Inheritance
Object    ValueType    Current
Implements
IComparable, IComparableCurrent, IComparableDouble, IConvertible, IEquatableCurrent, IEquatableDouble, IFormattable

Remarks

This class behaves just like a Double representing a current in amperes; it is implicitly castable to and from a Double and therefore can be generally used "as" a double, but it has the advantage of handling conversions to and from other current representations, specifically abampere (a.k.a., an electromagnetic unit) and statampere (a.k.a., esu per second). Metric conversions are handled simply by applying the needed SI conversion factor, for example:

Example

Convert current, in amperes, to kiloamperes:
C#
public double GetKiloamperes(Current amperes)
{
    return amperes / SI.Kilo;
}

Constructors

Current Creates a new Current.

Methods

CompareTo(Current) Compares this instance to a specified Current and returns an indication of their relative values.
CompareTo(Double) Compares this instance to a specified Double and returns an indication of their relative values.
CompareTo(Object) Compares this instance to a specified object and returns an indication of their relative values.
ConvertFrom Converts the value in the specified sourceUnit to a new Current in amperes.
ConvertTo Converts the Current to the specified targetUnit.
Equals(Current) Returns a value indicating whether this instance is equal to a specified Current value.
Equals(Double) Returns a value indicating whether this instance is equal to a specified Double value.
Equals(Object) Returns a value indicating whether this instance is equal to a specified object.
(Overrides ValueTypeEquals(Object))
FromAbamperes Creates a new Current value from the specified value in abamperes.
FromStatamperes Creates a new Current value from the specified value in statamperes.
GetHashCode Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetTypeCode Returns the TypeCode for value type Double.
Parse(String) Converts the string representation of a number to its Current equivalent.
Parse(String, NumberStyles) Converts the string representation of a number in a specified style to its Current equivalent.
Parse(String, IFormatProvider) Converts the string representation of a number in a specified culture-specific format to its Current equivalent.
Parse(String, NumberStyles, IFormatProvider) Converts the string representation of a number in a specified style and culture-specific format to its Current equivalent.
ToAbamperes Gets the Current value in abamperes.
ToStatamperes Gets the Current value in statamperes.
ToString Converts the numeric value of this instance to its equivalent string representation.
(Overrides ValueTypeToString)
ToString(IFormatProvider) Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.
ToString(String) Converts the numeric value of this instance to its equivalent string representation, using the specified format.
ToString(String, IFormatProvider) Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information.
TryParse(String, Current) Converts the string representation of a number to its Current equivalent. A return value indicates whether the conversion succeeded or failed.
TryParse(String, NumberStyles, IFormatProvider, Current) Converts the string representation of a number in a specified style and culture-specific format to its Current equivalent. A return value indicates whether the conversion succeeded or failed.

Operators

Addition(Current, Current) Returns computed sum of values.
Division(Current, Current) Returns computed division of values.
Equality(Current, Current) Compares the two values for equality.
Exponent(Current, Current) Returns result of first value raised to current of second value.
GreaterThan(Current, Current) Returns true if left value is greater than right value.
GreaterThanOrEqual(Current, Current) Returns true if left value is greater than or equal to right value.
(Current to Double) Implicitly converts Current, represented in amperes, to a Double.
(Double to Current) Implicitly converts value, represented in amperes, to a Current.
Inequality(Current, Current) Compares the two values for inequality.
LessThan(Current, Current) Returns true if left value is less than right value.
LessThanOrEqual(Current, Current) Returns true if left value is less or equal to than right value.
Modulus(Current, Current) Returns computed remainder after dividing first value by the second.
Multiply(Current, Current) Returns computed product of values.
Subtraction(Current, Current) Returns computed difference of values.

Fields

MaxValueRepresents the largest possible value of an Current. This field is constant.
MinValueRepresents the smallest possible value of an Current. This field is constant.

Extension Methods

GetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
GetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)

See Also