using System.Collections.Generic;
using System.Reactive.Linq;
public static class DeclaredProperties<T> {
public static List<string> Names = typeof(T).GetProperties
( System.Reflection.BindingFlags.Public
| System.Reflection.BindingFlags.Instance
| System.Reflection.BindingFlags.DeclaredOnly ).Select(p=>p.Name).ToList();
public static class RxUIExtensions {
public static IObservable<T> WhenAnyChanged<T>(T source) where T : ReactiveObject {
return source.Changed.Where(ev => DeclaredProperties<T>.Names.Contains(ev.PropertyName));
public static class Program
public static void Main()
Console.WriteLine("hello");