Struct ElectricCurrent
- Namespace
- UnitsNet
- Assembly
- UnitsNet.ElectricCurrent.dll
An electric current is a flow of electric charge. In electric circuits this charge is often carried by moving electrons in a wire. It can also be carried by ions in an electrolyte, or by both ions and electrons such as in a plasma.
public struct ElectricCurrentRemarks
If you want to map more parameters into the ElectricCurrent class (amps RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.
Constructors
ElectricCurrent(double, ElectricCurrentUnit)
Creates the quantity with the given numeric value and unit.
public ElectricCurrent(double value, ElectricCurrentUnit unit)Parameters
- valuedouble
- The numeric value to construct this quantity with. 
- unitElectricCurrentUnit
- The unit representation to construct this quantity with. 
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
Properties
Amperes
public double Amperes { get; }Property Value
BaseUnit
The base unit of ElectricCurrent, which is Second. All conversions go via this value.
public static ElectricCurrentUnit BaseUnit { get; }Property Value
Centiamperes
Gets a double value of this quantity converted into Centiampere
public double Centiamperes { get; }Property Value
Femtoamperes
Gets a double value of this quantity converted into Femtoampere
public double Femtoamperes { get; }Property Value
Kiloamperes
Gets a double value of this quantity converted into Kiloampere
public double Kiloamperes { get; }Property Value
MaxValue
Represents the largest possible value of ElectricCurrent.
public static ElectricCurrent MaxValue { get; }Property Value
Megaamperes
Gets a double value of this quantity converted into Megaampere
public double Megaamperes { get; }Property Value
Microamperes
Gets a double value of this quantity converted into Microampere
public double Microamperes { get; }Property Value
Milliamperes
Gets a double value of this quantity converted into Milliampere
public double Milliamperes { get; }Property Value
MinValue
Represents the smallest possible value of ElectricCurrent.
public static ElectricCurrent MinValue { get; }Property Value
Nanoamperes
Gets a double value of this quantity converted into Nanoampere
public double Nanoamperes { get; }Property Value
Picoamperes
Gets a double value of this quantity converted into Picoampere
public double Picoamperes { get; }Property Value
Unit
public ElectricCurrentUnit Unit { get; }Property Value
Value
The numeric value this quantity was constructed with.
public double Value { get; }Property Value
Zero
Gets an instance of this quantity with a value of 0 in the base unit Second.
public static ElectricCurrent Zero { get; }Property Value
Methods
As(ElectricCurrentUnit)
Convert to the unit representation unit.
public double As(ElectricCurrentUnit unit)Parameters
- unitElectricCurrentUnit
Returns
- double
- Value converted to the specified unit. 
From(double, ElectricCurrentUnit)
Dynamically convert from value and unit enum ElectricCurrentUnit to ElectricCurrent.
public static ElectricCurrent From(double value, ElectricCurrentUnit fromUnit)Parameters
- valuedouble
- Value to convert from. 
- fromUnitElectricCurrentUnit
- Unit to convert from. 
Returns
- ElectricCurrent
- ElectricCurrent unit value. 
FromAmperes(double)
Creates a ElectricCurrent from Ampere.
public static ElectricCurrent FromAmperes(double amperes)Parameters
- amperesdouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromCentiamperes(double)
Creates a ElectricCurrent from Centiampere.
public static ElectricCurrent FromCentiamperes(double centiamperes)Parameters
- centiamperesdouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromFemtoamperes(double)
Creates a ElectricCurrent from Femtoampere.
public static ElectricCurrent FromFemtoamperes(double femtoamperes)Parameters
- femtoamperesdouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromKiloamperes(double)
Creates a ElectricCurrent from Kiloampere.
public static ElectricCurrent FromKiloamperes(double kiloamperes)Parameters
- kiloamperesdouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromMegaamperes(double)
Creates a ElectricCurrent from Megaampere.
public static ElectricCurrent FromMegaamperes(double megaamperes)Parameters
- megaamperesdouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromMicroamperes(double)
Creates a ElectricCurrent from Microampere.
public static ElectricCurrent FromMicroamperes(double microamperes)Parameters
- microamperesdouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromMilliamperes(double)
Creates a ElectricCurrent from Milliampere.
public static ElectricCurrent FromMilliamperes(double milliamperes)Parameters
- milliamperesdouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromNanoamperes(double)
Creates a ElectricCurrent from Nanoampere.
public static ElectricCurrent FromNanoamperes(double nanoamperes)Parameters
- nanoamperesdouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromPicoamperes(double)
Creates a ElectricCurrent from Picoampere.
public static ElectricCurrent FromPicoamperes(double picoamperes)Parameters
- picoamperesdouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
ToUnit(ElectricCurrentUnit)
Converts this ElectricCurrent to another ElectricCurrent with the unit representation unit.
public ElectricCurrent ToUnit(ElectricCurrentUnit unit)Parameters
- unitElectricCurrentUnit
Returns
- ElectricCurrent
- A ElectricCurrent with the specified unit.