Struct Frequency
- Namespace
- UnitsNet
- Assembly
- UnitsNet.Frequency.dll
The number of occurrences of a repeating event per unit time.
public struct FrequencyConstructors
Frequency(double, FrequencyUnit)
Creates the quantity with the given numeric value and unit.
public Frequency(double value, FrequencyUnit unit)Parameters
- valuedouble
- The numeric value to construct this quantity with. 
- unitFrequencyUnit
- The 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
- unitFrequencyUnit
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
- valuedouble
- Value to convert from. 
- fromUnitFrequencyUnit
- Unit to convert from. 
Returns
- Frequency
- Frequency unit value. 
FromBUnits(double)
public static Frequency FromBUnits(double bunits)Parameters
- bunitsdouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromBeatsPerMinute(double)
Creates a Frequency from BeatPerMinute.
public static Frequency FromBeatsPerMinute(double beatsperminute)Parameters
- beatsperminutedouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromCyclesPerHour(double)
Creates a Frequency from CyclePerHour.
public static Frequency FromCyclesPerHour(double cyclesperhour)Parameters
- cyclesperhourdouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromCyclesPerMinute(double)
Creates a Frequency from CyclePerMinute.
public static Frequency FromCyclesPerMinute(double cyclesperminute)Parameters
- cyclesperminutedouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromGigahertz(double)
public static Frequency FromGigahertz(double gigahertz)Parameters
- gigahertzdouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromHertz(double)
public static Frequency FromHertz(double hertz)Parameters
- hertzdouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromKilohertz(double)
public static Frequency FromKilohertz(double kilohertz)Parameters
- kilohertzdouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromMegahertz(double)
public static Frequency FromMegahertz(double megahertz)Parameters
- megahertzdouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromMicrohertz(double)
Creates a Frequency from Microhertz.
public static Frequency FromMicrohertz(double microhertz)Parameters
- microhertzdouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromMillihertz(double)
Creates a Frequency from Millihertz.
public static Frequency FromMillihertz(double millihertz)Parameters
- millihertzdouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromPerSecond(double)
public static Frequency FromPerSecond(double persecond)Parameters
- perseconddouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromRadiansPerSecond(double)
Creates a Frequency from RadianPerSecond.
public static Frequency FromRadiansPerSecond(double radianspersecond)Parameters
- radiansperseconddouble
Returns
Exceptions
- ArgumentException
- If value is NaN or Infinity. 
FromTerahertz(double)
public static Frequency FromTerahertz(double terahertz)Parameters
- terahertzdouble
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
- unitFrequencyUnit
Returns
- Frequency
- A Frequency with the specified unit.