DatedDataValueCreate(Double, Double, DayRange) Method |
Returns a non-null
DatedDataValue object with the specified
value and percentage estimated, and covering the specified
DayRange.
Namespace: DegreeDays.Api.DataAssembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax public static DatedDataValue Create(
double value,
double percentageEstimated,
DayRange dayRange
)
Public Shared Function Create (
value As Double,
percentageEstimated As Double,
dayRange As DayRange
) As DatedDataValue
Parameters
- value Double
- Indicating the value to be held by the returned object (i.e.
the degree days).
- percentageEstimated Double
- A number, greater than or equal to zero and
less than or equal to 100, indicating the extent to which the
value is based on estimated data.
- dayRange DayRange
- The range of days that the value covers.
Return Value
DatedDataValueExceptions Exception | Condition |
---|
ArgumentOutOfRangeException | value is infinity,
or if percentageEstimated is less than 0 or greater
than 100. At the moment an ArgumentOutOfRangeException
will also be thrown if value is less than zero
(since degree-day values are always zero or greater), but this
may change in the future if this class is used for other types of
data. |
ArgumentException | value or
percentageEstimated is NaN. |
Remarks
If you pass this a DayRange covering just one Day,
the returned DatedDataValue will be equal to the
DatedDataValue that would be returned by passing that single
Day to Create(Double, Double, Day).
See Also