serpentthegreen: (Default)
serpentthegreen ([personal profile] serpentthegreen) wrote2013-04-09 07:57 pm

Слоупоческое : MS таки сделало это.

protected virtual void OnPropertyChanged[CallerMemberName] string PropertyName = null )
{
   PropertyChangedEventHandler handler = PropertyChanged;
   
   if( handler != null )
      handler( thisnew PropertyChangedEventArgs( PropertyName ) );
}
Не аспект, конечно и не полноценное автоматическое NotifyPropertyChanged, и вообще синтаксический сахар, но всё равно сильно удобнее.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting