Click or drag to resize

Current Structure

Represents an electric current measurement, in amperes, as a double-precision floating-point number.
Inheritance Hierarchy
SystemObject
  SystemValueType
    GSF.UnitsCurrent

Namespace: GSF.Units
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax
View Source

The Current type exposes the following members.

Constructors
 NameDescription
Public methodCurrent Creates a new Current.
Top
Methods
 NameDescription
Public methodCompareTo(Current) Compares this instance to a specified Current and returns an indication of their relative values.
Public methodCompareTo(Double) Compares this instance to a specified Double and returns an indication of their relative values.
Public methodCompareTo(Object) Compares this instance to a specified object and returns an indication of their relative values.
Public methodStatic memberConvertFrom Converts the value in the specified sourceUnit to a new Current in amperes.
Public methodConvertTo Converts the Current to the specified targetUnit.
Public methodEquals(Current) Returns a value indicating whether this instance is equal to a specified Current value.
Public methodEquals(Double) Returns a value indicating whether this instance is equal to a specified Double value.
Public methodEquals(Object) Returns a value indicating whether this instance is equal to a specified object.
(Overrides ValueTypeEquals(Object))
Public methodStatic memberFromAbamperes Creates a new Current value from the specified value in abamperes.
Public methodStatic memberFromStatamperes Creates a new Current value from the specified value in statamperes.
Public methodGetHashCode Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodGetTypeCode Returns the TypeCode for value type Double.
Public methodStatic memberParse(String) Converts the string representation of a number to its Current equivalent.
Public methodStatic memberParse(String, NumberStyles) Converts the string representation of a number in a specified style to its Current equivalent.
Public methodStatic memberParse(String, IFormatProvider) Converts the string representation of a number in a specified culture-specific format to its Current equivalent.
Public methodStatic memberParse(String, NumberStyles, IFormatProvider) Converts the string representation of a number in a specified style and culture-specific format to its Current equivalent.
Public methodToAbamperes Gets the Current value in abamperes.
Public methodToStatamperes Gets the Current value in statamperes.
Public methodToString Converts the numeric value of this instance to its equivalent string representation.
(Overrides ValueTypeToString)
Public methodToString(IFormatProvider) Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.
Public methodToString(String) Converts the numeric value of this instance to its equivalent string representation, using the specified format.
Public methodToString(String, IFormatProvider) Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information.
Public methodStatic memberTryParse(String, Current) Converts the string representation of a number to its Current equivalent. A return value indicates whether the conversion succeeded or failed.
Public methodStatic memberTryParse(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.
Top
Operators
 NameDescription
Public operatorStatic memberAddition(Current, Current) Returns computed sum of values.
Public operatorStatic memberDivision(Current, Current) Returns computed division of values.
Public operatorStatic memberEquality(Current, Current) Compares the two values for equality.
Public operatorStatic memberExponent(Current, Current) Returns result of first value raised to current of second value.
Public operatorStatic memberGreaterThan(Current, Current) Returns true if left value is greater than right value.
Public operatorStatic memberGreaterThanOrEqual(Current, Current) Returns true if left value is greater than or equal to right value.
Public operatorStatic member(Current to Double) Implicitly converts Current, represented in amperes, to a Double.
Public operatorStatic member(Double to Current) Implicitly converts value, represented in amperes, to a Current.
Public operatorStatic memberInequality(Current, Current) Compares the two values for inequality.
Public operatorStatic memberLessThan(Current, Current) Returns true if left value is less than right value.
Public operatorStatic memberLessThanOrEqual(Current, Current) Returns true if left value is less or equal to than right value.
Public operatorStatic memberModulus(Current, Current) Returns computed remainder after dividing first value by the second.
Public operatorStatic memberMultiply(Current, Current) Returns computed product of values.
Public operatorStatic memberSubtraction(Current, Current) Returns computed difference of values.
Top
Fields
 NameDescription
Public fieldStatic memberMaxValueRepresents the largest possible value of an Current. This field is constant.
Public fieldStatic memberMinValueRepresents the smallest possible value of an Current. This field is constant.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
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;
}
See Also