using System;
public class People{
public People (){}//有继承必须有无参构造方法;
public People(int i){
Console.WriteLine ("this is "+i);
}
public void say(int i){
Console.WriteLine ("this is "+i);
}
public void say(){
Console.WriteLine ("haha");
}
}
public class Student:People {
public Student (int j):base(j){
}
// public Student(int j){
// base.say (j);
// }
}
class Student1:People {
public Student1 (){
Console.WriteLine ("student1");
}
public new void say(){
Console.WriteLine ("hello");
}
}
public class Test{
public static void Main(){
//Student s = new Student (1);
People s1 = new Student1 ();
s1.say ();
}
}
public class People{
public People (){}//有继承必须有无参构造方法;
public People(int i){
Console.WriteLine ("this is "+i);
}
public void say(int i){
Console.WriteLine ("this is "+i);
}
public void say(){
Console.WriteLine ("haha");
}
}
public class Student:People {
public Student (int j):base(j){
}
// public Student(int j){
// base.say (j);
// }
}
class Student1:People {
public Student1 (){
Console.WriteLine ("student1");
}
public new void say(){
Console.WriteLine ("hello");
}
}
public class Test{
public static void Main(){
//Student s = new Student (1);
People s1 = new Student1 ();
s1.say ();
}
}