Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR ANGULARJS GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SASS VUE GEN AI SCIPY CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING BASH RUST

C# Exercises


Test your C# skills with exercises from all categories:

Exercises

Tip: Sign in to track your progress - it's free.

0/53 done

Syntax5 exercises

Done

Output3 exercises

Done

Comments4 exercises

Done

Variables8 exercises

Done

Constant Variables4 exercises

Done

Display Variables6 exercises

Done

Multiple Variables4 exercises

Done

Identifiers4 exercises

Done

Data Types6 exercises

Done

Type Casting5 exercises

Done

User Input7 exercises

Done

Arithmetic Operators7 exercises

Done

Assignment Operators5 exercises

Done

Comparison Operators5 exercises

Done

Logical Operators5 exercises

Done

Math7 exercises

Done

Strings7 exercises

Done

String Concatenation6 exercises

Done

String Interpolation4 exercises

Done

Access Strings6 exercises

Done

Special Characters5 exercises

Done

Booleans8 exercises

Done

If6 exercises

Done

Else3 exercises

Done

Else if3 exercises

Done

Shorthand if else4 exercises

Done

Switch6 exercises

Done

While Loop7 exercises

Done

For Loop6 exercises

Done

Break and Continue8 exercises

Done

Arrays7 exercises

Done

Array Loops5 exercises

Done

Sort Arrays6 exercises

Done

Multidimensional Arrays6 exercises

Done

Methods6 exercises

Done

Method Parameters8 exercises

Done

Default Parameter3 exercises

Done

Return Values5 exercises

Done

Method Overloading4 exercises

Done

OOP5 exercises

Done

Classes and Objects8 exercises

Done

Multiple Objects5 exercises

Done

Class Members7 exercises

Done

Constructors7 exercises

Done

Access Modifiers6 exercises

Done

Properties6 exercises

Done

Inheritance7 exercises

Done

Polymorphism5 exercises

Done

Abstraction6 exercises

Done

Interface7 exercises

Done

Enums8 exercises

Done

Files8 exercises

Done

Exceptions8 exercises

Done

Log in to track your progress

If you haven't already, sign up to become a W3Schooler, and get points for every exercise you complete.

As a logged on W3Schools user you will have access to many features like having your own web page, track your learning progress, receive personal guided paths, and more.


The Exercise

The exercises are a mix of "multiple choice" and "fill in the blanks" questions. There are between 3 and 9 questions in each category. The answer can be found in the corresponding tutorial chapter. If you're stuck, or answer wrong, you can try again or hit the "Show Answer" button to see the correct answer.


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2025 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.