Tim Hibbard

CEO for EnGraph software
posts - 628 , comments - 1631 , trackbacks - 459

My Links

News



Add to Google

Twitter












Tag Cloud

Article Categories

Archives

Post Categories

Image Galleries

EnGraph Blogs

Links

Other

Roll

C# code to rebuild properties after implementing INotifyPropertyChanged

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: , , ,

Print | posted on Thursday, May 24, 2007 9:43 AM | Filed Under [ .NET ]

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: