- C# - Home
- C# - Overview
- C# - Environment
- C# - Program Structure
- C# - Basic Syntax
- C# - Data Types
- C# - Type Conversion
- C# - Variables
- C# - Constants
- C# - Operators
- C# - Arithmetic Operators
- C# - Assignment Operators
- C# - Relational Operators
- C# - Logical Operators
- C# - Bitwise Operators
- C# - Miscellaneous Operators
- C# - Operators Precedence
- C# Conditional Statements
- C# - Decision Making
- C# - If
- C# - If Else
- C# - Nested If
- C# - Switch
- C# - Nested Switch
- C# - Switch Expressions
- C# Control Statements
- C# - Loops
- C# - For Loop
- C# - While Loop
- C# - Do While Loop
- C# - Nested Loops
- C# - Break
- C# - Continue
- C# - Foreach Loop
- C# - Goto Statement
- C# OOP & Data Handling
- C# - Encapsulation
- C# - Methods
- C# - Nullables
- C# - Arrays
- C# - Strings
- C# - Structure
- C# - Enums
- C# - Classes
- C# - Inheritance
- C# - Polymorphism
- C# - Operator Overloading
- C# - Interfaces
- C# - Namespaces
- C# - Preprocessor Directives
- C# - Regular Expressions
- C# - Exception Handling
- C# - File I/O
- C# Advanced Tutorial
- C# - Attributes
- C# - Reflection
- C# - Properties
- C# - Indexers
- C# - Delegates
- C# - Events
- C# - Collections
- C# - Generics
- C# - LINQ
- C# - IEnumerable vs IEnumerator
- C# - Anonymous Methods
- C# - Unsafe Codes
- C# - Tasks and Parallel Programming
- C# - Multithreading
- C# - Extension Methods
- C# - Async and Await
- C# Modern Features
- C# - Tuples
- C# - Pattern Matching Enhancements
- C# - Nullable Reference Types
- C# - What's New in C# 11 / 12 / 13
- C# Practical & Advanced Usage
- C# - JSON & XML Handling
C# Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to C#. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - Which of the following is a contextual keyword in C#?
Answer : D
Explanation
All of the above options are contextual keywords.
Q 2 - Which of the following converts a type to a byte value in C#?
Answer : B
Explanation
ToByte() method converts a type to a byte.
Q 3 - Which of the following converts a type to a specified type in C#?
Answer : A
Explanation
ToType() method converts a type to a specified type.
Q 4 - Which of the following operator represents a conditional operation in C#?
Answer : A
Explanation
?: operator represents a conditional operation.
Q 5 - Which of the following method copies the actual value of an argument into the formal parameter of the function?
Answer : A
Explanation
Value parameters method copies the actual value of an argument into the formal parameter of the function.
Q 6 - Which of the following property of Array class in C# checks whether the Array is readonly?
Answer : B
Explanation
IsReadOnly gets a value indicating whether the Array is readonly.
Q 7 - Which of the following is the default access specifier of a class?
Answer : D
Explanation
Default access specifier for a class type is Internal.
Q 8 - Which of the following is the correct about static member functions of a class?
A - You can also declare a member function as static.
B - Such functions can access only static variables.
C - The static functions exist even before the object is created.
Answer : D
Explanation
All of the above options are correct.
Q 9 - Which of the following preprocessor directive allows generating an error from a specific location in your code in C#?
Answer : D
Explanation
#error − It allows generating an error from a specific location in your code.
Q 10 - The System.SystemException class is the base class for all predefined system exception in C#?
Answer : A
Explanation
The System.SystemException class is the base class for all predefined system exception.