# C1.Schedule.BaseCollection-1

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Schedule_BaseCollection_1" data-uid="C1.Schedule.BaseCollection`1" class="text-break">BaseCollection&lt;T&gt; Class
</h1>
  <div class="markdown level0 summary"><p>The <a class="xref" href="C1.Schedule.BaseCollection-1.html">BaseCollection&lt;T&gt;</a> is a base generic class for all collections
in C1Schedule object model.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.collection-1">Collection</a>&lt;T&gt;</div>
    <div class="level2"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.keyedcollection-2">KeyedCollection</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a>, T&gt;</div>
    <div class="level3"><a class="xref" href="C1.Schedule.C1ObservableKeyedCollection-2.html">C1ObservableKeyedCollection</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a>, T&gt;</div>
    <div class="level4"><span class="xref">BaseCollection&lt;T&gt;</span></div>
      <div class="level5"><a class="xref" href="C1.Schedule.AppointmentCollection.html">AppointmentCollection</a></div>
      <div class="level5"><a class="xref" href="C1.Schedule.CategoryCollection.html">CategoryCollection</a></div>
      <div class="level5"><a class="xref" href="C1.Schedule.ContactCollection.html">ContactCollection</a></div>
      <div class="level5"><a class="xref" href="C1.Schedule.LabelCollection.html">LabelCollection</a></div>
      <div class="level5"><a class="xref" href="C1.Schedule.ResourceCollection.html">ResourceCollection</a></div>
      <div class="level5"><a class="xref" href="C1.Schedule.StatusCollection.html">StatusCollection</a></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList</a>&lt;T&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection</a>&lt;T&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ilist">IList</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.icollection">ICollection</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;T&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlycollection-1">IReadOnlyCollection</a>&lt;T&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;T&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.specialized.inotifycollectionchanged">INotifyCollectionChanged</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Schedule.html">C1.Schedule</a></h6>
  <h6><strong>Assembly</strong>: C1.ScheduleCore.dll</h6>
  <h5 id="C1_Schedule_BaseCollection_1_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[TypeConverter(typeof(CollectionConverter))]
public class BaseCollection&lt;T&gt; : C1ObservableKeyedCollection&lt;Guid, T&gt;, IList&lt;T&gt;, ICollection&lt;T&gt;, IList, ICollection, IReadOnlyList&lt;T&gt;, IReadOnlyCollection&lt;T&gt;, IEnumerable&lt;T&gt;, IEnumerable, INotifyCollectionChanged where T : BasePersistableObject</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;TypeConverter(GetType(CollectionConverter))&gt;
Public Class BaseCollection(Of T As BasePersistableObject)
    Inherits C1ObservableKeyedCollection(Of Guid, T)
    Implements IList(Of T), ICollection(Of T), IList, ICollection, IReadOnlyList(Of T), IReadOnlyCollection(Of T), IEnumerable(Of T), IEnumerable, INotifyCollectionChanged</code></pre>
  </div>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">T</span></td>
        <td><p>The type of the objects which will be stored in the collection.
It should be derived from the <a class="xref" href="C1.Schedule.BasePersistableObject.html">BasePersistableObject</a> class
and have the default parameter-less constructor.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Schedule_BaseCollection_1__ctor_System_Object_" data-uid="C1.Schedule.BaseCollection`1.#ctor(System.Object)">
          <a class="xref" href="C1.Schedule.BaseCollection-1.-ctor.html#C1_Schedule_BaseCollection_1__ctor_System_Object_">BaseCollection(object)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Schedule.BaseCollection-1.html">BaseCollection&lt;T&gt;</a> class.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Schedule_BaseCollection_1_Item_System_Guid_" data-uid="C1.Schedule.BaseCollection`1.Item(System.Guid)">
          <a class="xref" href="C1.Schedule.BaseCollection-1.Item.html#C1_Schedule_BaseCollection_1_Item_System_Guid_">this[Guid]</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the element with the specified key if any.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseCollection_1_OwnerInternal" data-uid="C1.Schedule.BaseCollection`1.OwnerInternal">
          <a class="xref" href="C1.Schedule.BaseCollection-1.OwnerInternal.html#C1_Schedule_BaseCollection_1_OwnerInternal">OwnerInternal</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseCollection_1_SuppressedDataChanging" data-uid="C1.Schedule.BaseCollection`1.SuppressedDataChanging">
          <a class="xref" href="C1.Schedule.BaseCollection-1.SuppressedDataChanging.html#C1_Schedule_BaseCollection_1_SuppressedDataChanging">SuppressedDataChanging</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or set the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a> value specifying whether change events should not be fired.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Schedule_BaseCollection_1_Add__0_" data-uid="C1.Schedule.BaseCollection`1.Add(`0)">
          <a class="xref" href="C1.Schedule.BaseCollection-1.Add.html#C1_Schedule_BaseCollection_1_Add__0_">Add(T)</a>
        </td>
        <td class="markdown level1 summary"><p>Adds a new custom object to the collection.
If the item already exists in the collection, its index is returned.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseCollection_1_AddRange_System_Object___" data-uid="C1.Schedule.BaseCollection`1.AddRange(System.Object[])">
          <a class="xref" href="C1.Schedule.BaseCollection-1.AddRange.html#C1_Schedule_BaseCollection_1_AddRange_System_Object___">AddRange(object[])</a>
        </td>
        <td class="markdown level1 summary"><p>Adds an array of objects to the collection.
This methods clears the collection before adding new items.
Don't use it if you want to keep preexisting items.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseCollection_1_AddRange__0___" data-uid="C1.Schedule.BaseCollection`1.AddRange(`0[])">
          <a class="xref" href="C1.Schedule.BaseCollection-1.AddRange.html#C1_Schedule_BaseCollection_1_AddRange__0___">AddRange(T[])</a>
        </td>
        <td class="markdown level1 summary"><p>Adds an array of objects to the collection.
This methods clears the collection before adding new items.
Don't use it if you want to keep preexisting items.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseCollection_1_BeginUpdate" data-uid="C1.Schedule.BaseCollection`1.BeginUpdate">
          <a class="xref" href="C1.Schedule.BaseCollection-1.BeginUpdate.html#C1_Schedule_BaseCollection_1_BeginUpdate">BeginUpdate()</a>
        </td>
        <td class="markdown level1 summary"><p>When overriden in derived class, starts batch operation.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseCollection_1_Contains_System_Int32_" data-uid="C1.Schedule.BaseCollection`1.Contains(System.Int32)">
          <a class="xref" href="C1.Schedule.BaseCollection-1.Contains.html#C1_Schedule_BaseCollection_1_Contains_System_Int32_">Contains(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Check if collection contains an item with specified index.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseCollection_1_EndUpdate" data-uid="C1.Schedule.BaseCollection`1.EndUpdate">
          <a class="xref" href="C1.Schedule.BaseCollection-1.EndUpdate.html#C1_Schedule_BaseCollection_1_EndUpdate">EndUpdate()</a>
        </td>
        <td class="markdown level1 summary"><p>When overriden in derived class, finishes batch operation.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseCollection_1_GetKeyForItem__0_" data-uid="C1.Schedule.BaseCollection`1.GetKeyForItem(`0)">
          <a class="xref" href="C1.Schedule.BaseCollection-1.GetKeyForItem.html#C1_Schedule_BaseCollection_1_GetKeyForItem__0_">GetKeyForItem(T)</a>
        </td>
        <td class="markdown level1 summary"><p>Extracts the key from the specified element.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseCollection_1_InsertItem_System_Int32__0_" data-uid="C1.Schedule.BaseCollection`1.InsertItem(System.Int32,`0)">
          <a class="xref" href="C1.Schedule.BaseCollection-1.InsertItem.html#C1_Schedule_BaseCollection_1_InsertItem_System_Int32__0_">InsertItem(int, T)</a>
        </td>
        <td class="markdown level1 summary"><p>Overrides default behavior of collection at inserting new items.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Schedule_BaseCollection_1_RemoveItem_System_Int32_" data-uid="C1.Schedule.BaseCollection`1.RemoveItem(System.Int32)">
          <a class="xref" href="C1.Schedule.BaseCollection-1.RemoveItem.html#C1_Schedule_BaseCollection_1_RemoveItem_System_Int32_">RemoveItem(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Overrides base class implementation.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="events">Events
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Schedule_BaseCollection_1_ItemChanged" data-uid="C1.Schedule.BaseCollection`1.ItemChanged">
          <a class="xref" href="C1.Schedule.BaseCollection-1.ItemChanged.html">ItemChanged</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when one of collection items has been changed.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
