diff options
Diffstat (limited to 'src/mscorlib/shared/System/Collections/Generic/ICollection.cs')
-rw-r--r-- | src/mscorlib/shared/System/Collections/Generic/ICollection.cs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/mscorlib/shared/System/Collections/Generic/ICollection.cs b/src/mscorlib/shared/System/Collections/Generic/ICollection.cs new file mode 100644 index 0000000000..52852aa1fb --- /dev/null +++ b/src/mscorlib/shared/System/Collections/Generic/ICollection.cs @@ -0,0 +1,35 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Runtime.CompilerServices; +using System.Diagnostics.Contracts; + +namespace System.Collections.Generic +{ + // Base interface for all collections, defining enumerators, size, and + // synchronization methods. + public interface ICollection<T> : IEnumerable<T> + { + // Number of items in the collections. + int Count { get; } + + bool IsReadOnly { get; } + + void Add(T item); + + void Clear(); + + bool Contains(T item); + + // CopyTo copies a collection into an Array, starting at a particular + // index into the array. + // + void CopyTo(T[] array, int arrayIndex); + + //void CopyTo(int sourceIndex, T[] destinationArray, int destinationIndex, int count); + + bool Remove(T item); + } +} |