Table of Contents

Class DateRange

Namespace
Balsam
Assembly
Balsam.Backtester.dll

Encapsulates a date range.

public class DateRange
Inheritance
DateRange
Inherited Members
Extension Methods

Constructors

DateRange(DateTime, DateTime)

Instantiates a new DateRange object.

public DateRange(DateTime startDate, DateTime endDate)

Parameters

startDate DateTime
endDate DateTime

Exceptions

ArgumentOutOfRangeException

Properties

Description

Gets/sets a description.

public string Description { get; set; }

Property Value

string

EndDate

Gets the end date.

public DateTime EndDate { get; }

Property Value

DateTime

StartDate

Gets the start date.

public DateTime StartDate { get; }

Property Value

DateTime

Methods

Contains(DateTime)

Returns true if the specified date is within the date range inclusive of start/end dates.

public bool Contains(DateTime date)

Parameters

date DateTime

Returns

bool

Equals(DateRange)

Returns true if the specified DateRange start/end dates are equal to this one.

public bool Equals(DateRange range)

Parameters

range DateRange

Returns

bool

Equals(object)

Returns true if the specified object is equal to this date range.

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

Returns the hash code for this object.

public override int GetHashCode()

Returns

int