Struct ElectricResistance
- Namespace
- UnitsNet
- Assembly
- UnitsNet.ElectricResistance.dll
The electrical resistance of an electrical conductor is the opposition to the passage of an electric current through that conductor.
public struct ElectricResistance
Constructors
ElectricResistance(double, ElectricResistanceUnit)
Creates the quantity with the given numeric value and unit.
public ElectricResistance(double value, ElectricResistanceUnit unit)
Parameters
value
doubleThe numeric value to construct this quantity with.
unit
ElectricResistanceUnitThe unit representation to construct this quantity with.
Exceptions
- ArgumentException
If value is NaN or Infinity.
Properties
BaseUnit
The base unit of ElectricResistance, which is Second. All conversions go via this value.
public static ElectricResistanceUnit BaseUnit { get; }
Property Value
Gigaohms
public double Gigaohms { get; }
Property Value
Kiloohms
public double Kiloohms { get; }
Property Value
MaxValue
Represents the largest possible value of ElectricResistance.
public static ElectricResistance MaxValue { get; }
Property Value
Megaohms
public double Megaohms { get; }
Property Value
Microohms
public double Microohms { get; }
Property Value
Milliohms
public double Milliohms { get; }
Property Value
MinValue
Represents the smallest possible value of ElectricResistance.
public static ElectricResistance MinValue { get; }
Property Value
Ohms
public double Ohms { get; }
Property Value
Teraohms
public double Teraohms { get; }
Property Value
Unit
public ElectricResistanceUnit 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 ElectricResistance Zero { get; }
Property Value
Methods
As(ElectricResistanceUnit)
Convert to the unit representation unit
.
public double As(ElectricResistanceUnit unit)
Parameters
Returns
- double
Value converted to the specified unit.
From(double, ElectricResistanceUnit)
Dynamically convert from value and unit enum ElectricResistanceUnit to ElectricResistance.
public static ElectricResistance From(double value, ElectricResistanceUnit fromUnit)
Parameters
value
doubleValue to convert from.
fromUnit
ElectricResistanceUnitUnit to convert from.
Returns
- ElectricResistance
ElectricResistance unit value.
FromGigaohms(double)
Creates a ElectricResistance from Gigaohm.
public static ElectricResistance FromGigaohms(double gigaohms)
Parameters
gigaohms
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromKiloohms(double)
Creates a ElectricResistance from Kiloohm.
public static ElectricResistance FromKiloohms(double kiloohms)
Parameters
kiloohms
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMegaohms(double)
Creates a ElectricResistance from Megaohm.
public static ElectricResistance FromMegaohms(double megaohms)
Parameters
megaohms
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMicroohms(double)
Creates a ElectricResistance from Microohm.
public static ElectricResistance FromMicroohms(double microohms)
Parameters
microohms
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMilliohms(double)
Creates a ElectricResistance from Milliohm.
public static ElectricResistance FromMilliohms(double milliohms)
Parameters
milliohms
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromOhms(double)
Creates a ElectricResistance from Ohm.
public static ElectricResistance FromOhms(double ohms)
Parameters
ohms
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromTeraohms(double)
Creates a ElectricResistance from Teraohm.
public static ElectricResistance FromTeraohms(double teraohms)
Parameters
teraohms
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
ToUnit(ElectricResistanceUnit)
Converts this ElectricResistance to another ElectricResistance with the unit representation unit
.
public ElectricResistance ToUnit(ElectricResistanceUnit unit)
Parameters
Returns
- ElectricResistance
A ElectricResistance with the specified unit.