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 528561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:59:59+00:00 2026-05-13T08:59:59+00:00

I was wondering if anyone had a possible solution to the following problem… I

  • 0

I was wondering if anyone had a possible solution to the following problem… I have a base class that a series of derived classes will inherit from. The base class cares about whether properties on the derived class have changed. This is to set up an “IsDirty” approach for a data transfer object.

The traditional approach would be to set an IsDirty boolean flag declared in the base class. I was hoping to avoid this somehow, and was wondering if there might be another approach? I am concerned about a developer not remembering to set the flag in the equivalent set operation on a property in the derived class. I had considered the idea of creating a generic “SetProperty” method that would take the property name and value, but thought that there might be something more elegant.

Just as a side note, ideas regarding using reflection are not a problem. Regardless of the expense of reflection, I would like to prove out a way to do it and work on refining it further on down the road.

  • 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-05-13T08:59:59+00:00Added an answer on May 13, 2026 at 8:59 am

    Can you force the derived classes to implement INotifyPropertyChanged? In that case I’d add a listener to the PropertyChanged event in the base class constructur and chill. The derived class now still needs to follow the pattern (which might be something you want to avoid?).

    Nice read for a “no literal strings used” approach for raising the property changed events: http://monotorrent.blogspot.com/2009/12/yet-another-inotifypropertychanged-with_06.html

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

Sidebar

Related Questions

I have been stuck on this for days, and was wondering if anyone had
I came across the following http://ckeditor.com/demo , and was wondering if anyone had a
I was wondering if anyone had any suggestions on improving the following code (if
Was wondering if anyone had any smart approaches to creating dynamic vanity user urls
I was wondering if anyone had developed an approach for using NHibernate / Fluent
I was wondering if anyone had an opinion on what they think is the
I was wondering if anyone had any advice on parsing a file with fixed
I was just wondering if anyone had any experience with more customized/specified theme rolling?
I was wondering if anyone had experience of trying to get Eth to enter
I was wondering if anyone had any resources, proof, or personal experience in using

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.