Esempio n. 1
0
        public static void Main()
        {
            Student student = new Student("Peter", 22);

            student.PropertyChanged += (sender, eventArgs) =>
            {
                Console.WriteLine("Property changed: {0} (from {1} to {2})",
                eventArgs.PropertyName,
                eventArgs.OldValue, 
                eventArgs.NewValue);
            };

            student.Name = "Maria";
            student.Age = 19;
        }
 static void Main(string[] args)
 {
     Student pesho = new Student("Pesho",24);
     pesho.ChangeProfileName("Mariika");
     pesho.ChangeProfileAge(18);
 }