Struct Frequency
- Namespace
- UnitsNet
- Assembly
- UnitsNet.Frequency.dll
The number of occurrences of a repeating event per unit time.
public struct Frequency
Constructors
Frequency(double, FrequencyUnit)
Creates the quantity with the given numeric value and unit.
public Frequency(double value, FrequencyUnit unit)
Parameters
value
doubleThe numeric value to construct this quantity with.
unit
FrequencyUnitThe unit representation to construct this quantity with.
Exceptions
- ArgumentException
If value is NaN or Infinity.
Properties
BUnits
public double BUnits { get; }
Property Value
BaseUnit
The base unit of Frequency, which is Second. All conversions go via this value.
public static FrequencyUnit BaseUnit { get; }
Property Value
BeatsPerMinute
Gets a double value of this quantity converted into BeatPerMinute
public double BeatsPerMinute { get; }
Property Value
CyclesPerHour
Gets a double value of this quantity converted into CyclePerHour
public double CyclesPerHour { get; }
Property Value
CyclesPerMinute
Gets a double value of this quantity converted into CyclePerMinute
public double CyclesPerMinute { get; }
Property Value
Gigahertz
public double Gigahertz { get; }
Property Value
Hertz
public double Hertz { get; }
Property Value
Kilohertz
public double Kilohertz { get; }
Property Value
MaxValue
Represents the largest possible value of Frequency.
public static Frequency MaxValue { get; }
Property Value
Megahertz
public double Megahertz { get; }
Property Value
Microhertz
Gets a double value of this quantity converted into Microhertz
public double Microhertz { get; }
Property Value
Millihertz
Gets a double value of this quantity converted into Millihertz
public double Millihertz { get; }
Property Value
MinValue
Represents the smallest possible value of Frequency.
public static Frequency MinValue { get; }
Property Value
PerSecond
public double PerSecond { get; }
Property Value
RadiansPerSecond
Gets a double value of this quantity converted into RadianPerSecond
public double RadiansPerSecond { get; }
Property Value
Terahertz
public double Terahertz { get; }
Property Value
Unit
public FrequencyUnit 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 Frequency Zero { get; }
Property Value
Methods
As(FrequencyUnit)
Convert to the unit representation unit
.
public double As(FrequencyUnit unit)
Parameters
unit
FrequencyUnit
Returns
- double
Value converted to the specified unit.
From(double, FrequencyUnit)
Dynamically convert from value and unit enum FrequencyUnit to Frequency.
public static Frequency From(double value, FrequencyUnit fromUnit)
Parameters
value
doubleValue to convert from.
fromUnit
FrequencyUnitUnit to convert from.
Returns
- Frequency
Frequency unit value.
FromBUnits(double)
public static Frequency FromBUnits(double bunits)
Parameters
bunits
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromBeatsPerMinute(double)
Creates a Frequency from BeatPerMinute.
public static Frequency FromBeatsPerMinute(double beatsperminute)
Parameters
beatsperminute
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromCyclesPerHour(double)
Creates a Frequency from CyclePerHour.
public static Frequency FromCyclesPerHour(double cyclesperhour)
Parameters
cyclesperhour
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromCyclesPerMinute(double)
Creates a Frequency from CyclePerMinute.
public static Frequency FromCyclesPerMinute(double cyclesperminute)
Parameters
cyclesperminute
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromGigahertz(double)
public static Frequency FromGigahertz(double gigahertz)
Parameters
gigahertz
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromHertz(double)
public static Frequency FromHertz(double hertz)
Parameters
hertz
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromKilohertz(double)
public static Frequency FromKilohertz(double kilohertz)
Parameters
kilohertz
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMegahertz(double)
public static Frequency FromMegahertz(double megahertz)
Parameters
megahertz
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMicrohertz(double)
Creates a Frequency from Microhertz.
public static Frequency FromMicrohertz(double microhertz)
Parameters
microhertz
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMillihertz(double)
Creates a Frequency from Millihertz.
public static Frequency FromMillihertz(double millihertz)
Parameters
millihertz
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromPerSecond(double)
public static Frequency FromPerSecond(double persecond)
Parameters
persecond
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromRadiansPerSecond(double)
Creates a Frequency from RadianPerSecond.
public static Frequency FromRadiansPerSecond(double radianspersecond)
Parameters
radianspersecond
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromTerahertz(double)
public static Frequency FromTerahertz(double terahertz)
Parameters
terahertz
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
ToUnit(FrequencyUnit)
Converts this Frequency to another Frequency with the unit representation unit
.
public Frequency ToUnit(FrequencyUnit unit)
Parameters
unit
FrequencyUnit
Returns
- Frequency
A Frequency with the specified unit.