"No Add Method when Trying to Use Collection Initializer"

static void Test() {
	// Won't compile
	// Doesn't work becuase UserDatabase calls its add method AddUser(), so we have to use the second approach below
	var database = new UserDatabase {
		new User("Ben", 30),
		new User("Seb", 27),
		new User("Rob", 33)
	};
	
	// Will compile but less pretty
	var database = new UserDatabase();
	database.AddUser(new User("Ben", 30));
	database.AddUser(new User("Seb", 27));
	database.AddUser(new User("Rob", 33));
}


Code snippet taken from "Two Decades of C#: A Reference - C# 5 and C# 6".