static void Main(string[] args) { // Casestudy1(); Player p1 = new Player("abc", 15, 102); // Console.WriteLine("count of players is :{0}",p1.); Player p2 = new Player("zxc", 10, 103); // Console.WriteLine("count of players is :{0}",p2.Count); Player p3 = new Player("z", 17, 104); // Console.WriteLine("count of players is :{0}", p1.Count); int c = Player.GetCount(); Console.WriteLine("Count:{0}", c); }
private static void CaseStudy1() { Player sachin = new Player("sachin", 101, 102); Printinfo(sachin); Player sehwag = new Player("Sehwag", 10); Printinfo(sehwag); Player sg = new Player("Sehwag", 101, 104); Printinfo(sg); Player elder = sachin.WhoisElder(sehwag); Console.WriteLine("Elder player is: {0}", elder.Name); int c = Player.GetCount(); Console.WriteLine(" player is: {0}", c); }