Table of Contents

Class DayOfTheWeekCollection

Namespace
Microsoft.Exchange.WebServices.Data
Assembly
Microsoft.Exchange.WebServices.dll

Represents a collection of DayOfTheWeek values.

public sealed class DayOfTheWeekCollection : ComplexProperty, IEnumerable<DayOfTheWeek>, IEnumerable
Inheritance
DayOfTheWeekCollection
Implements
Inherited Members

Properties

Count

Gets the number of days in the collection.

public int Count { get; }

Property Value

int

this[int]

Gets the DayOfTheWeek at a specific index in the collection.

public DayOfTheWeek this[int index] { get; }

Parameters

index int

Index

Property Value

DayOfTheWeek

DayOfTheWeek at index

Methods

Add(DayOfTheWeek)

Adds a day to the collection if it is not already present.

public void Add(DayOfTheWeek dayOfTheWeek)

Parameters

dayOfTheWeek DayOfTheWeek

The day to add.

AddRange(IEnumerable<DayOfTheWeek>)

Adds multiple days to the collection if they are not already present.

public void AddRange(IEnumerable<DayOfTheWeek> daysOfTheWeek)

Parameters

daysOfTheWeek IEnumerable<DayOfTheWeek>

The days to add.

Clear()

Clears the collection.

public void Clear()

GetEnumerator()

Gets an enumerator that iterates through the elements of the collection.

public IEnumerator<DayOfTheWeek> GetEnumerator()

Returns

IEnumerator<DayOfTheWeek>

An IEnumerator for the collection.

Remove(DayOfTheWeek)

Remove a specific day from the collection.

public bool Remove(DayOfTheWeek dayOfTheWeek)

Parameters

dayOfTheWeek DayOfTheWeek

The day to remove.

Returns

bool

True if the day was removed from the collection, false otherwise.

RemoveAt(int)

Removes the day at a specific index.

public void RemoveAt(int index)

Parameters

index int

The index of the day to remove.

ToString()

Builds string representation of the collection.

public override string ToString()

Returns

string

A comma-delimited string representing the collection.