Click or drag to resize

TimeIntervalCollectionTAdd Method (TimeIntervalT)

Adds an interval to the interval collection. If the interval or a portion of the interval already exists in the collection, the Data from item will replace the data already in the collection.

Namespace:  AGI.Foundation.Time
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax
public void Add(
	TimeInterval<T> item
)

Parameters

item
Type: AGI.Foundation.TimeTimeIntervalT
The interval to add.

Implements

ICollectionTAdd(T)
Exceptions
ExceptionCondition
InvalidOperationException Thrown when this TimeIntervalCollection is read-only.
Remarks
DefaultComparer is used to compare the Data properties of the intervals. If item overlaps any intervals already in the collection, the Data property from item takes precedence and replaces the existing Data for the interval of overlap.
See Also