Q31.webp
red_rose

Q31.webp

  • Media owner red_rose
  • Ngày thêm
Kizspy | Question: 31
(Choose 1 answer)
Which code snippet demonstrates inheritance in C#?
A. class Animal
{
}
public void Speak()
Console.WriteLine("Animal speaks");
}
}
class Dog Animal
{
public void Bark()
Console.WriteLine("Dog barks");
{
}
}
class Program
{
static void Main(string[] args)
{
Dog myDog = new Dog();
myDog.Speak();
myDog.Bark();
}
}
B. class Animal
}
}
public void Speak
Cons
FUQne("Animal speaks");

Thông tin

Category
PRN212
Thêm bởi
red_rose
Ngày thêm
Lượt xem
1,985
Lượt bình luận
6
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom