// 5) declare method NewGoods for event initiation // use parameter string to get GoodsName internal void NewGoods(string GoodsName) { if (event4 != null) { var lol1 = new GoodsInfoEventArgs(GoodsName); event4(this, lol1); } }
// 8) declare method GotNewGoods with 2 parameters: // 1 - object type // 2 - GoodsInfoEventArgs type public void GotNewGoods(object sender, GoodsInfoEventArgs eventArgs) { Console.WriteLine($"For {name} is new good: {eventArgs.GoodsName}"); }
// 8) declare method GotNewGoods with 2 parameters: // 1 - object type // 2 - GoodsInfoEventArgs type public void GotNewGoods(object sender, GoodsInfoEventArgs e) { Console.WriteLine("Hello new good"); }
// 7) declare constructor to initialize name // 8) declare method GotNewGoods with 2 parameters: // 1 - object type // 2 - GoodsInfoEventArgs type public void GotNewGoods(object sender, GoodsInfoEventArgs e) { Console.WriteLine("pisechka"); }
// 8) declare method GotNewGoods with 2 parameters: // 1 - object type // 2 - GoodsInfoEventArgs type public void GotNewGoods(object obj, GoodsInfoEventArgs e) { Console.WriteLine($"Dear {this.name}.\t\tThe Store has new book: \"{e.GoodName}\""); }
// 8) declare method GotNewGoods with 2 parameters: public void GotNewGoods(object obj, GoodsInfoEventArgs e) { Console.WriteLine("new Goods"); }
// 8) declare method GotNewGoods with 2 parameters: // 1 - object type // 2 - GoodsInfoEventArgs type public void GotNewGoods(object o, GoodsInfoEventArgs e) { Console.WriteLine("{0} pain attention,we got new {1}", name, e.GoodsName); }