Geeks With Blogs

News



Add to Google

Tim Hibbard CEO for EnGraph software

I wrote some code that is meant for people that want to easily implement INotifyPropertyChanged after using the "prop" code snippet.  It will take code that looks like this:

public int DriverID
{
   get { return _driverID; }
   set { _driverID = value; }
} 

And return it like this:

public int DriverID
{
   get { return _driverID; }
   set
   {
      _driverID = value;
      OnPropertyChanged("DriverID");
   }
}

It also will ignore any triple slash comments and #regions.  So you can copy your entire #region --Properties-- into the class and it will return a #region --Properties-- with the new OnPropertyChanged code.

The article with the code is here.

 

Technorati tags: , , ,
Posted on Thursday, May 24, 2007 9:43 AM .NET | Back to top


Comments on this post: C# code to rebuild properties after implementing INotifyPropertyChanged

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Tim Hibbard | Powered by: GeeksWithBlogs.net