C Sharp (C#) - Polymorphism and Abstract Classes
Which of the following is the correct way to override a method named
Calculate in a derived class in C#?Calculate in a derived class in C#?override keyword.override. public new int Calculate() { return 0; } uses new which hides the base method but does not override. public virtual int Calculate() { return 0; } declares a new virtual method, not an override. public int Calculate() { return 0; } is a normal method without override.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions