# System.Collections.ObjectModel ``` diff +namespace System.Collections.ObjectModel { + public class Collection : ICollection, ICollection, IEnumerable, IEnumerable, IList, IList, IReadOnlyCollection, IReadOnlyList { + public Collection(); + public Collection(IList list); + public int Count { get; } + protected IList Items { get; } + bool System.Collections.Generic.ICollection.IsReadOnly { get; } + bool System.Collections.ICollection.IsSynchronized { get; } + object System.Collections.ICollection.SyncRoot { get; } + bool System.Collections.IList.IsFixedSize { get; } + bool System.Collections.IList.IsReadOnly { get; } + object System.Collections.IList.this[int index] { get; set; } + public T this[int index] { get; set; } + public void Add(T item); + public void Clear(); + protected virtual void ClearItems(); + public bool Contains(T item); + public void CopyTo(T[] array, int index); + public IEnumerator GetEnumerator(); + public int IndexOf(T item); + public void Insert(int index, T item); + protected virtual void InsertItem(int index, T item); + public bool Remove(T item); + public void RemoveAt(int index); + protected virtual void RemoveItem(int index); + protected virtual void SetItem(int index, T item); + void System.Collections.ICollection.CopyTo(Array array, int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + int System.Collections.IList.Add(object value); + bool System.Collections.IList.Contains(object value); + int System.Collections.IList.IndexOf(object value); + void System.Collections.IList.Insert(int index, object value); + void System.Collections.IList.Remove(object value); + } + public abstract class KeyedCollection : Collection { + protected KeyedCollection(); + protected KeyedCollection(IEqualityComparer comparer); + protected KeyedCollection(IEqualityComparer comparer, int dictionaryCreationThreshold); + public IEqualityComparer Comparer { get; } + protected IDictionary Dictionary { get; } + public TItem this[TKey key] { get; } + protected void ChangeItemKey(TItem item, TKey newKey); + protected override void ClearItems(); + public bool Contains(TKey key); + protected abstract TKey GetKeyForItem(TItem item); + protected override void InsertItem(int index, TItem item); + public bool Remove(TKey key); + protected override void RemoveItem(int index); + protected override void SetItem(int index, TItem item); + } + public class ObservableCollection : Collection, INotifyCollectionChanged, INotifyPropertyChanged { + public ObservableCollection(); + public ObservableCollection(IEnumerable collection); + public virtual event NotifyCollectionChangedEventHandler CollectionChanged; + protected virtual event PropertyChangedEventHandler PropertyChanged; + event PropertyChangedEventHandler System.ComponentModel.INotifyPropertyChanged.PropertyChanged; + protected IDisposable BlockReentrancy(); + protected void CheckReentrancy(); + protected override void ClearItems(); + protected override void InsertItem(int index, T item); + public void Move(int oldIndex, int newIndex); + protected virtual void MoveItem(int oldIndex, int newIndex); + protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs e); + protected virtual void OnPropertyChanged(PropertyChangedEventArgs e); + protected override void RemoveItem(int index); + protected override void SetItem(int index, T item); + } + public class ReadOnlyCollection : ICollection, ICollection, IEnumerable, IEnumerable, IList, IList, IReadOnlyCollection, IReadOnlyList { + public ReadOnlyCollection(IList list); + public int Count { get; } + protected IList Items { get; } + bool System.Collections.Generic.ICollection.IsReadOnly { get; } + T System.Collections.Generic.IList.this[int index] { get; set; } + bool System.Collections.ICollection.IsSynchronized { get; } + object System.Collections.ICollection.SyncRoot { get; } + bool System.Collections.IList.IsFixedSize { get; } + bool System.Collections.IList.IsReadOnly { get; } + object System.Collections.IList.this[int index] { get; set; } + public T this[int index] { get; } + public bool Contains(T value); + public void CopyTo(T[] array, int index); + public IEnumerator GetEnumerator(); + public int IndexOf(T value); + void System.Collections.Generic.ICollection.Add(T value); + void System.Collections.Generic.ICollection.Clear(); + bool System.Collections.Generic.ICollection.Remove(T value); + void System.Collections.Generic.IList.Insert(int index, T value); + void System.Collections.Generic.IList.RemoveAt(int index); + void System.Collections.ICollection.CopyTo(Array array, int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + int System.Collections.IList.Add(object value); + void System.Collections.IList.Clear(); + bool System.Collections.IList.Contains(object value); + int System.Collections.IList.IndexOf(object value); + void System.Collections.IList.Insert(int index, object value); + void System.Collections.IList.Remove(object value); + void System.Collections.IList.RemoveAt(int index); + } + public class ReadOnlyDictionary : ICollection, ICollection>, IDictionary, IDictionary, IEnumerable, IEnumerable>, IReadOnlyCollection>, IReadOnlyDictionary { + public ReadOnlyDictionary(IDictionary dictionary); + public int Count { get; } + protected IDictionary Dictionary { get; } + public ReadOnlyDictionary.KeyCollection Keys { get; } + bool System.Collections.Generic.ICollection>.IsReadOnly { get; } + TValue System.Collections.Generic.IDictionary.this[TKey key] { get; set; } + ICollection System.Collections.Generic.IDictionary.Keys { get; } + ICollection System.Collections.Generic.IDictionary.Values { get; } + IEnumerable System.Collections.Generic.IReadOnlyDictionary.Keys { get; } + IEnumerable System.Collections.Generic.IReadOnlyDictionary.Values { get; } + bool System.Collections.ICollection.IsSynchronized { get; } + object System.Collections.ICollection.SyncRoot { get; } + bool System.Collections.IDictionary.IsFixedSize { get; } + bool System.Collections.IDictionary.IsReadOnly { get; } + object System.Collections.IDictionary.this[object key] { get; set; } + ICollection System.Collections.IDictionary.Keys { get; } + ICollection System.Collections.IDictionary.Values { get; } + public TValue this[TKey key] { get; } + public ReadOnlyDictionary.ValueCollection Values { get; } + public bool ContainsKey(TKey key); + public IEnumerator> GetEnumerator(); + void System.Collections.Generic.ICollection>.Add(KeyValuePair item); + void System.Collections.Generic.ICollection>.Clear(); + bool System.Collections.Generic.ICollection>.Contains(KeyValuePair item); + void System.Collections.Generic.ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex); + bool System.Collections.Generic.ICollection>.Remove(KeyValuePair item); + void System.Collections.Generic.IDictionary.Add(TKey key, TValue value); + bool System.Collections.Generic.IDictionary.Remove(TKey key); + void System.Collections.ICollection.CopyTo(Array array, int index); + void System.Collections.IDictionary.Add(object key, object value); + void System.Collections.IDictionary.Clear(); + bool System.Collections.IDictionary.Contains(object key); + IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator(); + void System.Collections.IDictionary.Remove(object key); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public bool TryGetValue(TKey key, out TValue value); + public sealed class KeyCollection : ICollection, ICollection, IEnumerable, IEnumerable, IReadOnlyCollection { + public int Count { get; } + bool System.Collections.Generic.ICollection.IsReadOnly { get; } + bool System.Collections.ICollection.IsSynchronized { get; } + object System.Collections.ICollection.SyncRoot { get; } + public void CopyTo(TKey[] array, int arrayIndex); + public IEnumerator GetEnumerator(); + void System.Collections.Generic.ICollection.Add(TKey item); + void System.Collections.Generic.ICollection.Clear(); + bool System.Collections.Generic.ICollection.Contains(TKey item); + bool System.Collections.Generic.ICollection.Remove(TKey item); + void System.Collections.ICollection.CopyTo(Array array, int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class ValueCollection : ICollection, ICollection, IEnumerable, IEnumerable, IReadOnlyCollection { + public int Count { get; } + bool System.Collections.Generic.ICollection.IsReadOnly { get; } + bool System.Collections.ICollection.IsSynchronized { get; } + object System.Collections.ICollection.SyncRoot { get; } + public void CopyTo(TValue[] array, int arrayIndex); + public IEnumerator GetEnumerator(); + void System.Collections.Generic.ICollection.Add(TValue item); + void System.Collections.Generic.ICollection.Clear(); + bool System.Collections.Generic.ICollection.Contains(TValue item); + bool System.Collections.Generic.ICollection.Remove(TValue item); + void System.Collections.ICollection.CopyTo(Array array, int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + } + public class ReadOnlyObservableCollection : ReadOnlyCollection, INotifyCollectionChanged, INotifyPropertyChanged { + public ReadOnlyObservableCollection(ObservableCollection list); + protected virtual event NotifyCollectionChangedEventHandler CollectionChanged; + protected virtual event PropertyChangedEventHandler PropertyChanged; + event NotifyCollectionChangedEventHandler System.Collections.Specialized.INotifyCollectionChanged.CollectionChanged; + event PropertyChangedEventHandler System.ComponentModel.INotifyPropertyChanged.PropertyChanged; + protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args); + protected virtual void OnPropertyChanged(PropertyChangedEventArgs args); + } +} ```