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

  • Home
  • SEARCH
  • 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 881439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:15:36+00:00 2026-05-15T12:15:36+00:00

In this post i found INotifyPropertyChanged and i check it’s example but I notice

  • 0

In this post i found INotifyPropertyChanged and i check it’s example but I notice that i can do the same thing without implement INotifyPropertyChanged and more i can define my event and do the same…

For example in

public string CustomerName
{
    get
    {
        return this.customerNameValue;
    }    
    set
    {
        if (value != this.customerNameValue)
        {
            this.customerNameValue = value;
            NotifyPropertyChanged("CustomerName");
        }
    }
}

I can put any string and it can be passed without any validation and i already do something like that as below

public delegate void ChangeHandler(string item);
public class DemoCustomer2 
{
    // These fields hold the values for the public properties.
    private Guid idValue = Guid.NewGuid();
    private string customerNameValue = String.Empty;
    private string phoneNumberValue = String.Empty;

    public event ChangeHandler OnChange;
    void CallOnChange(string item)
    {
        if (OnChange != null)
            OnChange(item);
    }

    // The constructor is private to enforce the factory pattern.
    private DemoCustomer2()
    {
        customerNameValue = "Customer";
        phoneNumberValue = "(555)555-5555";
    }

    // This is the public factory method.
    public static DemoCustomer2 CreateNewCustomer()
    {
        return new DemoCustomer2();
    }

    // This property represents an ID, suitable
    // for use as a primary key in a database.
    public Guid ID
    {
        get
        {
            return this.idValue;
        }
    }

    public string CustomerName
    {
        get
        {
            return this.customerNameValue;
        }
        set
        {
            if (value != this.customerNameValue)
            {
                this.customerNameValue = value;
                CallOnChange("CustomerName");
            }
        }
    }

    public string PhoneNumber
    {
        get
        {
            return this.phoneNumberValue;
        }
        set
        {
            if (value != this.phoneNumberValue)
            {
                this.phoneNumberValue = value;
                CallOnChange("PhoneNumber");
            }
        }
    }
}

I didn’t find any usefully of using it but could anybody guide me if is there any really useful use for these?

  • 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-15T12:15:37+00:00Added an answer on May 15, 2026 at 12:15 pm

    It’s not the implementation that is significant about INotifyPropertyChanged, it’s the fact that there is an “official” way of doing things in the framework now. So basically what it gives you is a promise that if you implement the interface, your implementing classes will work with all built-in and third-party components that take advantage of it. When you role your own solution, there is no way to know whether or not your code is going to get along well with others.

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

Sidebar

Related Questions

I found this post that shows how to pass multiple check box selections to
I found this post, which seems to be an exact duplicate, but I can't
I recently found this post . It basically says that Eclipse has a modified
I found this post on Crystal Reports Cutting Off Text in PDF , but
I've done a bit of searching around and found this post ... But i'm
I just found this post , we have almost the same scenario with the
I found this post: Python Regex vs PHP Regex but I actually did not
I found this post and it was very useful, but what I need is
Found this post that helped me out: Split a string to form multidimensional array
Found this post Include namespace in Rails 3.1 console but it doesn't seem to

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.