0
comment
on 8/25/2012 9:13 AM
C# 5 allows you to obtain the method or property of the caller to a method using the CallerMemberName attribute under System.Runtime.CompilerServices in .Net 4.5:using System.ComponentModel; using System.Runtime.CompilerServices; public class ObservableObject : INotifyPropertyChanged { protected void NotifyPropertyChanged([CallerMemberName] string name = null) { var e = PropertyChanged; if (e != null) e(this, new PropertyChangedEventArgs(name)); } public event PropertyChangedEventHandler[...]
>> Read the full article on trelford.com
.
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper