static void Main(string[] args) { Student s1 = new Student(); s1.Marks2 = 100; s1.CalculateNewPercent(); Console.WriteLine("{0},{1},{2},{3}", s1.Name, s1.Marks1.ToString(), s1.Marks2.ToString(), s1.Percent.ToString()); Student s2 = new Student("Swati", 0, 80); Console.WriteLine("{0},{1},{2},{3}", s2.Name, s2.Marks1.ToString(), s2.Marks2.ToString(), s2.Percent); Console.WriteLine(); Console.ReadKey(); }
static void Main(string[] args) { Student s1 = new Student(); s1.Marks2 = 100; s1.CalculateNewPercent(); Console.WriteLine("{0},{1},{2},{3}",s1.Name, s1.Marks1.ToString(), s1.Marks2.ToString(), s1.Percent.ToString()); Student s2 = new Student("Swati", 0, 80); Console.WriteLine("{0},{1},{2},{3}", s2.Name, s2.Marks1.ToString(), s2.Marks2.ToString(), s2.Percent); Console.WriteLine(); Console.ReadKey(); }