<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/c-tip-observablecollection---a-data-type-to-intercept-changes-to-the-collection-kujf0sqkp" -->

---
title: C# Tip: ObservableCollection - a data type to intercept...
description: ObservableCollection&lt;T&gt; is a .NET generic collection that raises events when items are added, removed, or moved, via the INotifyCollectionChanged and...
canonical: https://daily.dev/posts/c-tip-observablecollection---a-data-type-to-intercept-changes-to-the-collection-kujf0sqkp
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: C# Tip: ObservableCollection - a data type to intercept changes to the collection | daily.dev
og:description: ObservableCollection&lt;T&gt; is a .NET generic collection that raises events when items are added, removed, or moved, via the INotifyCollectionChanged and...
og:url: https://daily.dev/posts/c-tip-observablecollection---a-data-type-to-intercept-changes-to-the-collection-kujf0sqkp
og:image: https://api.daily.dev/og/posts/kUJF0sqkP.png
og:image:alt: C# Tip: ObservableCollection - a data type to intercept changes to the collection
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# C# Tip: ObservableCollection - a data type to intercept changes to the collection

**[Code4IT](https://daily.dev/sources/code4it)** · 7 min read · 0 upvotes · 0 comments

## Summary

ObservableCollection<T> is a .NET generic collection that raises events when items are added, removed, or moved, via the INotifyCollectionChanged and INotifyPropertyChanged interfaces. The piece walks through wiring up CollectionChanged and PropertyChanged event handlers, inspecting NotifyCollectionChangedEventArgs for Add/Remove/Move operations, and shows example console output for each case. It also notes gotchas: events fire only after construction, mutating a property on an object already in the collection does not raise an event, and the type is not thread-safe (linking to a third-party thread-safe implementation).

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.code4it.dev/csharptips/observablecollection>

## Questions this post answers

### How do I get notified when items are added or removed from a collection in C#?

Use ObservableCollection<T> from System.Collections.ObjectModel, which implements INotifyCollectionChanged. Subscribe to its CollectionChanged event with a handler accepting NotifyCollectionChangedEventArgs; the event's Action property tells you whether it was an Add, Remove, or Move, and OldItems/NewItems expose the affected values.

_daily.dev surfaces practical .NET patterns like this for developers building reactive data layers._

### Does ObservableCollection fire an event when I change a property on an object already in the collection?

No. ObservableCollection only raises CollectionChanged or PropertyChanged events when the reference held by the collection itself changes, such as adding, removing, or moving items. Mutating a property on an object instance that is already stored in the collection, like setting a Name field, does not trigger any event.

_Developers debugging silent UI or state updates can keep notes like this handy on daily.dev._

### Is ObservableCollection<T> thread-safe in .NET?

No, ObservableCollection<T> is not thread-safe. Concurrent modifications from multiple threads can cause issues, so a custom thread-safe wrapper is needed for multi-threaded scenarios; Gérald Barré (Meziantou) has published an implementation addressing this gap.

_daily.dev helps developers track community workarounds for .NET concurrency gotchas like this one._

## Similar posts on daily.dev

- [MVVM in 2026: Reducing Boilerplate with Source Generators](https://daily.dev/posts/mvvm-in-2026-reducing-boilerplate-with-source-generators-9bs4g8vl0) · Medium · 0 upvotes · 0 comments
- [Delegates and events in C\# explained](https://daily.dev/posts/delegates-and-events-in-c-explained-p282unysa) · Round The Code · 14 upvotes · 0 comments
- [Understanding C\# Events Using a Simple ICU Example](https://daily.dev/posts/understanding-c-events-using-a-simple-icu-example-bvtejfw85) · C\# Corner · 0 upvotes · 0 comments

---

Tags: [#.net](https://daily.dev/tags/.net), [#c#](https://daily.dev/tags/c#)

[View this post on daily.dev](https://daily.dev/posts/c-tip-observablecollection---a-data-type-to-intercept-changes-to-the-collection-kujf0sqkp)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"C# Tip: ObservableCollection - a data type to intercept changes to the collection","url":"https://daily.dev/posts/c-tip-observablecollection---a-data-type-to-intercept-changes-to-the-collection-kujf0sqkp","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/c-tip-observablecollection---a-data-type-to-intercept-changes-to-the-collection-kujf0sqkp"},"datePublished":"2026-10-04T13:05:35.503Z","dateModified":"2026-10-04T13:12:58.712Z","description":"ObservableCollection<T> is a .NET generic collection that raises events when items are added, removed, or moved, via the INotifyCollectionChanged and...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c346c590f61b934b6c07d176d8629cf6?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c346c590f61b934b6c07d176d8629cf6?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Code4IT","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Code4IT","logo":"https://media.daily.dev/image/upload/s--OaaG4G10--/f_auto,q_auto/v1791119049/logos/code4it?_a=BAMAMicg0","url":"https://daily.dev/sources/code4it"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/c-tip-observablecollection---a-data-type-to-intercept-changes-to-the-collection-kujf0sqkp","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":".net,c#","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Code4IT","item":"https://daily.dev/sources/code4it"},{"@type":"ListItem","position":3,"name":"C# Tip: ObservableCollection - a data type to intercept changes to the collection"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/c-tip-observablecollection---a-data-type-to-intercept-changes-to-the-collection-kujf0sqkp#faq","mainEntity":[{"@type":"Question","name":"How do I get notified when items are added or removed from a collection in C#?","acceptedAnswer":{"@type":"Answer","text":"Use ObservableCollection<T> from System.Collections.ObjectModel, which implements INotifyCollectionChanged. Subscribe to its CollectionChanged event with a handler accepting NotifyCollectionChangedEventArgs; the event's Action property tells you whether it was an Add, Remove, or Move, and OldItems/NewItems expose the affected values. daily.dev surfaces practical .NET patterns like this for developers building reactive data layers."}},{"@type":"Question","name":"Does ObservableCollection fire an event when I change a property on an object already in the collection?","acceptedAnswer":{"@type":"Answer","text":"No. ObservableCollection only raises CollectionChanged or PropertyChanged events when the reference held by the collection itself changes, such as adding, removing, or moving items. Mutating a property on an object instance that is already stored in the collection, like setting a Name field, does not trigger any event. Developers debugging silent UI or state updates can keep notes like this handy on daily.dev."}},{"@type":"Question","name":"Is ObservableCollection<T> thread-safe in .NET?","acceptedAnswer":{"@type":"Answer","text":"No, ObservableCollection<T> is not thread-safe. Concurrent modifications from multiple threads can cause issues, so a custom thread-safe wrapper is needed for multi-threaded scenarios; Gérald Barré (Meziantou) has published an implementation addressing this gap. daily.dev helps developers track community workarounds for .NET concurrency gotchas like this one."}}]}
```

