
Sealed vs Virtual in C#
Quiz
•
Information Technology (IT)
•
12th Grade
•
Practice Problem
•
Hard
Praise A
FREE Resource
Enhance your content in a minute
23 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The virtual keyword in C# indicates that a method:
Can be overridden by a derived class
Cannot be overridden
Must be implemented by every subclass
Is only accessible within the same assembly
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The purpose of a virtual method is to:
Provide a default implementation that derived classes can change
Force all derived classes to implement the method
Prevent inherited classes from accessing the method
Allow only static access to the method
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following keywords is used in a derived class to replace the behavior of a virtual method?
override
base
extends
implements
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When overriding a method, what happens if you call base.MethodName()?
It creates a new instance of the base class
It calls the original implementation from the base class
It removes the overridden implementation
It hides the method from derived classes
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword prevents further overriding of a virtual or overridden method?
sealed
static
const
readonly
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if a derived class tries to override a sealed method?
The base version runs automatically
The compiler produces an error
The override is ignored silently
The override only applies at runtime
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The ability to override virtual methods in subclasses is an example of which object-oriented principle?
Polymorphism
Encapsulation
Aggregation
Composition
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
19 questions
3D Animation Quiz
Quiz
•
12th Grade
21 questions
Unit 3: Basic Python & Console Interaction
Quiz
•
9th - 12th Grade
20 questions
Advanced Drone Regulations Quiz
Quiz
•
5th Grade - University
22 questions
Cyber I - 1.1 Quiz 2 - CIA Triad & Authentication
Quiz
•
9th - 12th Grade
25 questions
Using the Developer Tab in Word
Quiz
•
10th Grade - University
26 questions
Digital Asset Review
Quiz
•
10th Grade - University
20 questions
Prova Front-end
Quiz
•
12th Grade
19 questions
PPDAC Cycle Quiz
Quiz
•
12th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Information Technology (IT)
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
55 questions
CHS Holiday Trivia
Quiz
•
12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade
