C# Mastery Hub
Home
Challenges
Discussion
Lessons
Core Topics
C# Fundamentals
Console Applications
Classes & OOP
Windows Forms
ASP.NET Core
SQL Server
VS & SQL Connection
RDLC Reports
.NET MAUI
Getting Started
Getting Started
Website Development
SEO Guide
Security
Project Workflow
Extra Topics
Cloud & Deployment
AWS Cloud
Deployment
About
Contact
Test Your Knowledge
C# Fundamentals - Lesson 10: Methods Basics Quiz
Answer all questions to test your understanding
1
What is a method in C#?
A block of code that performs a specific task
A variable that stores data
A type of class
A property that validates data
2
What is method overloading?
Multiple methods with the same name but different parameters
Methods with different names
Methods in different classes
Methods that return different types
3
What does the 'params' keyword do?
Makes a parameter optional
Allows a method to accept a variable number of arguments
Makes a parameter read-only
Passes parameters by reference
4
What is the difference between ref and out parameters?
ref requires initialization, out doesn't
out requires initialization, ref doesn't
They are the same
ref is for value types only
5
What is a static method?
A method that belongs to the class, not an instance
A method that belongs to an instance
A method that never changes
A method that cannot be called
Submit Quiz