ReminderCollection Class
Represents a collection of Reminder elements.
public sealed class ReminderCollection : IList<Reminder>, ICollection<Reminder>, IEnumerable<Reminder>, IEnumerable
Public NotInheritable Class ReminderCollection
Implements IList(Of Reminder), ICollection(Of Reminder), IEnumerable(Of Reminder), IEnumerable
- Inheritance:
- System.ObjectReminderCollection
Implements
Properties
Count
Gets the number of elements contained in the ReminderCollection.
Property Value
- System.Int32
The number of elements contained in the ReminderCollection.
IsReadOnly
Gets a value indicating whether the ReminderCollection is read-only.
Property Value
- System.Boolean
true
if the ReminderCollection is read-only; otherwise, false
.
Item[Int32]
Gets or sets the element at the specified index.
public Reminder this[int index] { get; set; }
Public Property Item(index As Integer) As Reminder
Parameters
index
- System.Int32
The zero-based index of the element to get or set.
Property Value
The element at the specified index.
Methods
Add(Reminder)
Adds an element to the end of the ReminderCollection.
Parameters
item
- Reminder
The element to be added to the end of the ReminderCollection.
Clear()
Removes all elements from the ReminderCollection.
Contains(Reminder)
Determines whether an element is in the ReminderCollection. Returns true even if item has changed and is not synchronized with this ReminderCollection.
Parameters
item
- Reminder
The element to locate in the ReminderCollection.
Returns
- System.Boolean
true
if item
is found in the ReminderCollection; otherwise, false
.
CopyTo(Reminder[], Int32)
Copies the entire ReminderCollection to a compatible one-dimensional array, starting at the specified index of the target array.
public void CopyTo(Reminder[] array, int arrayIndex)
Public Sub CopyTo(array As Reminder(), arrayIndex As Integer)
Parameters
array
- Reminder[]
The one-dimensional array that is the destination of the elements copied from ReminderCollection.
arrayIndex
- System.Int32
The zero-based index in array
at which copying begins.
GetEnumerator()
Returns an enumerator that iterates through the ReminderCollection.
public IEnumerator<Reminder> GetEnumerator()
Public Function GetEnumerator As IEnumerator(Of Reminder)
Returns
- System.Collections.Generic.IEnumerator<Reminder>
An enumerator for the ReminderCollection.
IndexOf(Reminder)
Searches for the specified object and returns the zero-based index of the first occurrence within the entire ReminderCollection.
Parameters
item
- Reminder
The element to locate in the ReminderCollection.
Returns
- System.Int32
The zero-based index of the first occurrence of item
within the entire ReminderCollection, if found; otherwise, -1.
Insert(Int32, Reminder)
Inserts an element into the ReminderCollection at the specified index.
public void Insert(int index, Reminder item)
Public Sub Insert(index As Integer, item As Reminder)
Parameters
index
- System.Int32
The zero-based index at which item
should be inserted.
item
- Reminder
The element to insert.
Remove(Reminder)
Removes the first occurrence of a specific element from the ReminderCollection.
Parameters
item
- Reminder
The element to remove from the ReminderCollection.
Returns
- System.Boolean
true
if element is successfully removed; otherwise, false
. This method also returns false
if item was not found in the ReminderCollection.
RemoveAt(Int32)
Removes the element at the specified index of the ReminderCollection.
Parameters
index
- System.Int32
The zero-based index of the element to remove.