public void AddUser(string name = "name") { var user = new User(name); _users.Add(user); user.Renamed2 += delegate(object sender, RenamedEventArgs e) { Console.WriteLine("{0} was renamed to {1}!", e.OldName, e.Name); }; user.Renamed2 += (sender, e) => { Console.WriteLine("ZOMG its " + e.Name); }; }
public void AddUser2(string name = "Hello") { var user = new User(name); }