Test Your C# Knowledge

Put your C# skills to the test with this quiz featuring 10 questions on various aspects of the language.

published on September 16
1/10

What does C# stand for?

C Plus Plus
Computer Science
C Sharp
Coding Standard
2/10

Which company originally developed C#?

Apple
Google
Microsoft
Amazon
3/10

What is the syntax for declaring a variable in C#?

let myVar = 10;
var myVar = 10;
int myVar = 10;
const myVar = 10;
4/10

In C#, what is the symbol used for comments?

//
<!-- -->
// or /* */
#
5/10

Which of the following is not a data type in C#?

int
float
bool
string
6/10

What does the 'using' keyword do in C#?

Imports a library
Declares a new variable
Helps manage resources like files or network connections
Starts a loop
7/10

Which of the following is a correct way to write a 'for' loop in C#?

for (i = 0; i < 10) {}
for (int i = 0; i < 10; i++) {}
for (int i = 0; i < 10) {}
for (int i = 0; i++) {}
8/10

What is the base class for all classes in C#?

What is the base class for all classes in C#?
System.Object
System.Base
System.Class
System.Parent
9/10

Which keyword is used to prevent a method from being overridden in C#?

Which keyword is used to prevent a method from being overridden in C#?
virtual
sealed
override
static
10/10

What is the C# equivalent of the 'switch' statement in Python?

switch
match
if/else ladder
options