static void Main(string[] args) { ListTracker tracker = new ListTracker(); tracker.OnChange += () => { Console.WriteLine("Test"); }; tracker.Add(5); //Console.WriteLine(tracker.List[0]); }
static void Main(string[] args) { ListTracker tracker = new ListTracker(); tracker.OnChange += () => Console.WriteLine("Changed!"); Func <string, int> test = (string gosho) => { Console.WriteLine(gosho); return(5); }; tracker.Add(test("Peshoo")); Console.WriteLine(tracker.List[0]); }