W
wonglihuang
Guest
class Animal
{
public string name;
public Animal(string name)
{
this.name = name;
}
}
class Dog: Animal //there is an error
{
}
static void Main(string[] args)
{
Dog dog = new Dog();
dog.name = "小狗";
Console.WriteLine(dog.name);
Console.Read();
}
Anyone can help to point to why there is an error.
Continue reading...
{
public string name;
public Animal(string name)
{
this.name = name;
}
}
class Dog: Animal //there is an error
{
}
static void Main(string[] args)
{
Dog dog = new Dog();
dog.name = "小狗";
Console.WriteLine(dog.name);
Console.Read();
}
Anyone can help to point to why there is an error.
Continue reading...