static void Main(string[] args) { //our test model object var something = new Something(); //we are going to add a delegate method to the PropertyChange //so that we can view the property names something.PropertyChanged += something_PropertyChanged; //name uses the linq extension to resolve the property name something.MyName = "Jason"; //street uses the [CallerMemberName] attribute to automatically get the property name something.Street = "123 Ave A."; var somethingInterface = (ISomething)something; //name uses the linq extension to resolve the property name somethingInterface.MyName = "Jason (2)"; //street uses the [CallerMemberName] attribute to automatically get the property name somethingInterface.Street = "123 Ave A. (2)"; //extension on interface type Console.WriteLine("Prop Name: " + somethingInterface.ToName(x => x.MyName)); //the following code shows the behavior of the extension based on //two types of inputs. //using a property Console.WriteLine("Prop Name: " + something.ToName(x => x.MyName)); //using a method Console.WriteLine("Method Name: " + something.ToName(x => x.ToString())); //let's test another class var otherClassTest = new StringBuilder(); //using a method (note: the Append method is not executed) Console.WriteLine("Method Name: " + otherClassTest.ToName(x => x.Append("TEST"))); //the string value is not "TEST" Console.WriteLine("StringBuilder Value: " + otherClassTest.ToString()); Console.Read(); }