- 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# - Custom Exceptions
- 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# - Lambda Expressions
- C# - Async and Await
- C# Modern Features
- C# - Tuples
- C# - Records
- C# - Pattern Matching Enhancements
- C# - Top-level Statements
- C# - Nullable Reference Types
- C# - What's New in C# 11 / 12 / 13
- C# - Global Usings
- C# - File-Scoped Namespaces
- C# Practical & Advanced Usage
- C# - JSON & XML Handling
- C# - Data Serialization & Deserialization
- C# - REST API Calls with Httpclient
- C# - Dependency Injection
- C# - Unit Testing with NUnit, xUnit & MSTest
- C# - Package Management with NuGet
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 keyword is used for including the namespaces in the program in C#?
Answer : B
Explanation
The using keyword is used for including the namespaces in the program.
Q 2 - Which of the following converts a type to a Boolean value, where possible in C#?
Answer : A
Explanation
ToBoolean() method converts a type to a Boolean value, where possible.
Q 3 - Which of the following converts a floating point or integer type to a decimal type in C#?
Answer : A
Explanation
ToDecimal() method converts a floating point or integer type to a decimal type.
Q 4 - Which of the following operator determines whether an object is of a certain type in C#?
Answer : B
Explanation
is operator determines whether an object is of a certain type.
Q 5 - Which of the following access specifier in C# allows a class to hide its member variables and member functions from other class objects and functions, except a child class within the same application?
Answer : A
Explanation
Protected Internal access specifier allows a class to hide its member variables and member functions from other class objects and functions, except a child class within the same application.
Q 6 - Which of the following is correct about nullable types in C#?
B - You can assign true, false, or null in a Nullable<bool> variable.
Answer : D
Explanation
All of the above statements are correct.
Q 7 - Which of the following is the correct about class member functions?
Answer : C
Explanation
Both of the above options are correct.
Answer : A
Explanation
The comparison operators can be overloaded.
Q 9 - Which of the following is the correct about namespaces in C#?
A - A namespace is designed for providing a way to keep one set of names separate from another.
C - The using keyword states that the program is using the names in the given namespace.
Answer : D
Explanation
All of the above options are correct.
Q 10 - Which of the following is true about catch block in C#?
B - The catch keyword indicates the catching of an exception.
Answer : C
Explanation
Both of the above options are correct.