Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8302645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:20:21+00:00 2026-06-08T17:20:21+00:00

I have used ObservableCollection for DataBinding in my WPF application where I am binding

  • 0

I have used ObservableCollection for DataBinding in my WPF application where I am binding the collection to DataGrids and ComboBoxes. And due to a requirement, where I needed to remove objects from the collection based on a condition, I implemented the RemoveAll functionality, like List, using Extension method.

This posts specifies a few merits of Inheritance over Extension methods but is not very specific for my case as this was the only method I needed to add and I don’t intend to add another Extension method for the Collection.

I would like to know if it would be better for me to have this implemented as Extension method as is or should I think about inheriting the class and add it as a Instance method?

Also, I would like to know if there is any performance difference between the two as it has not been discussed in the mentioned post.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T17:20:22+00:00Added an answer on June 8, 2026 at 5:20 pm

    For the sake of one method I would use an Extension Method. In this instance it would mean your code can continue to use ObservableCollection<T> without needing to maintain a custom type.

    Extension methods simply boil down to static method calls when compiled, so I can’t imagine performance is any worse than with inheritance. If anything it should be the same or better.

    Personal preference is usually what drives the choice of extension methods.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have used an ObservableCollection with WPF for binding and this works well. What
I'm building a WPF application and while creating my domain model I used ObservableCollection<T>
In a MVVM WPF application, I have a master-detail View that is used to
I have used ObservableCollection<T> in the past, but that seems to belong to WPF
I have used geocoder in my ruby on rails application for a while but
I have datagrid with list of MyPlayer objects linked to ItemsSource, there are ComboBoxes
I have a wpf window which is used to add as well as edit
I've put together a WPF application using ObservableCollection and Dependency Properties which is cool
I have several CollectionViewSource instances all used on the same ObservableCollection. I also have
I have a really weird issue with Combobox in WPF. I have used it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.