EXERCISE TOPIC▼
- Access exercises (91)
- C# exercises (79)
- Excel exercises (278)
- Power Apps exercises (13)
- Power Automate exercises (18)
- Power BI exercises (139)
- Power Platform exercises (157)
- Python exercises (28)
- Report Builder exercises (141)
- SQL exercises (198)
- SSAS exercises (51)
- SSIS exercises (46)
- SSRS exercises (99)
- VBA exercises (85)
- Visual Basic exercises (46)
C# EXERCISES▼
VISUAL C# EXERCISES▼
- Creating forms (4)
- Coding form events (1)
- Laying out your code (2)
- C# variables (4)
- Enumerations and constants (2)
- Conditions (2)
- Modular code (3)
- Arrays (2)
- Looping (2)
- Files and folders (3)
- Properties in C# (3)
- Using lists (3)
- Validating forms (6)
- Toolbars, menus and status bars (1)
- FileDialogs and StreamReaders (1)
- Debugging and trapping errors (1)
- Introduction to DataGridViews (1)
- DataGridView events (3)
- Complex DataGridViews (2)
- Creating classes (4)
- The form as a class (1)
- Data structures (6)
- Inheritance (5)
- Interfaces (2)
- Delegates and events (2)
- Writing LINQ (2)
- Advanced LINQ (2)
- Entity Frameworks (1)
- LINQ with Entity Frameworks (4)
- Grouping using LINQ (2)
- LINQ to SQL (2)
Free Visual C# exercises
This page lists 79 Visual C# exercises. You can use the menu on the left to show just exercises for a specific topic.
This page lists 79 Visual C# exercises. You can use the menu above to show just exercises for a specific topic.
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Enumerations and constants |
Level: | Relatively easy |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Use an enumeration to test which age band a dating agency applicant falls into. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Creating classes |
Level: | Relatively easy |
Courses: | Fast track C#Intermediate C# |
Exercise: | Write a class to make existing code to display a football score work. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Properties in C# |
Level: | Relatively easy |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Use read-only properties to process a dating agency application. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Inheritance |
Level: | Relatively easy |
Course: | |
Exercise: | Inherit the Form class to create a custom WinForms form template. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Using lists |
Level: | Relatively easy |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Write a C# program to create an integer list of the first few squares. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Modular code |
Level: | Relatively easy |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Write your own procedure to display a message box, with 2 arguments. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Data structures |
Level: | Relatively easy |
Courses: | Fast track C#Intermediate C# |
Exercise: | Use a list to add, remove, count and display the Beatles. |
Software: | Visual C# |
Version: | |
Topic: | Creating forms |
Level: | Relatively easy |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Create a simple form for entering a star sign, setting tab order, tooltips and accelerator keys. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Introduction to DataGridViews |
Level: | Relatively easy |
Course: | |
Exercise: | Create a DataGridView showing mortgage types from an Access database, and format it to look pretty. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Creating forms |
Level: | Relatively easy |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Create a simple form, with two text boxes, two buttons and a GroupBox, to show one star sign. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Validating forms |
Level: | Relatively easy |
Course: | |
Exercise: | Create a form for entering the age of a person using a NumericUpDown control. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | LINQ with Entity Frameworks |
Level: | Relatively easy |
Courses: | Fast track C#Intermediate C# |
Exercise: | Use a simple LINQ statement to list out all of the events in a table. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Looping |
Level: | Relatively easy |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Find the longest text in a combo box by looping over its items. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Creating classes |
Level: | Relatively easy |
Courses: | Fast track C#Intermediate C# |
Exercise: | Create a class to hold an item in a shopping list, and use this to create a shopping list. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Creating classes |
Level: | Relatively easy |
Courses: | Fast track C#Intermediate C# |
Exercise: | Create a shopping list form by creating a new shopping item class. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Inheritance |
Level: | Relatively easy |
Course: | |
Exercise: | Take a reality TV show application, and use inheritance to make it more specific. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Writing LINQ |
Level: | Relatively easy |
Courses: | Fast track C#Intermediate C# |
Exercise: | Enumerate string names of Dr Who candidates using LINQ. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Entity Frameworks |
Level: | Relatively easy |
Courses: | Fast track C#Intermediate C# |
Exercise: | Listing authors and book counts using LINQ to SQL classes. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | C# variables |
Level: | Relatively easy |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Use variables and the Length property to show how long text is. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Debugging and trapping errors |
Level: | Relatively easy |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | First step through lines of code, then add DEBUG.WRITE and DEBUG.INDENT statements to create trace information. |
Software: | Visual C# |
Version: | |
Topic: | Validating forms |
Level: | Relatively easy |
Course: | |
Exercise: | Using a NumericUpDown control to check that an age is filled in correctly. |
Software: | Visual C# |
Version: | |
Topic: | Validating forms |
Level: | Relatively easy |
Course: | |
Exercise: | Create a form for entering a name and age, and add validation on the Validating event to check both are filled in correctly. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Conditions |
Level: | Relatively easy |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Use C# if conditions to check a user has filled in a form. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Laying out your code |
Level: | Relatively easy |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Create a C# program to display choices made in a message box. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Files and folders |
Level: | Relatively easy |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Use a StreamWriter to write data input to a text file. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Toolbars, menus and status bars |
Level: | Average difficulty |
Course: | |
Exercise: | Create a menu, toolbar and short-cut menu for a form, including full coding. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | LINQ with Entity Frameworks |
Level: | Average difficulty |
Courses: | Fast track C#Intermediate C# |
Exercise: | Use LINQ to add rows to two different tables, saving your changes. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Arrays |
Level: | Average difficulty |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Store items typed into a textbox in an array, then loop over its items. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Data structures |
Level: | Average difficulty |
Courses: | Fast track C#Intermediate C# |
Exercise: | Create a list of objects, add items to it and display the results. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Properties in C# |
Level: | Average difficulty |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Create read-only properties for weight, height and BMI. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | C# variables |
Level: | Average difficulty |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Create a private variable for a form to keep track of button clicks. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Creating forms |
Level: | Average difficulty |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Draw a form allowing a dating agency candidate to enter their name and date of birth, and choose their sexuality from a drop list. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Modular code |
Level: | Average difficulty |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Write a function to return a man's oomph factor given various inputs. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Modular code |
Level: | Average difficulty |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Write a C# function to return a person's BMI from their height/weight. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Data structures |
Level: | Average difficulty |
Courses: | Fast track C#Intermediate C# |
Exercise: | Use a sorted dictionary to create a prioritised to-do list in C#. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Inheritance |
Level: | Average difficulty |
Course: | |
Exercise: | Create a recurring task class inheriting from a base to-do task. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Data structures |
Level: | Average difficulty |
Courses: | Fast track C#Intermediate C# |
Exercise: | Create a class to hold to-do tasks, and a list to hold these tasks. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Inheritance |
Level: | Average difficulty |
Course: | |
Exercise: | Use a cuddly toy class to inherit from a base toy class. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Advanced LINQ |
Level: | Average difficulty |
Courses: | Fast track C#Intermediate C# |
Exercise: | Use LINQ anonymous types to return star signs as new 2-property class. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Interfaces |
Level: | Average difficulty |
Course: | |
Exercise: | Add an interface so room hires and dates are treated the same way. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | The form as a class |
Level: | Average difficulty |
Courses: | Fast track C#Intermediate C# |
Exercise: | Create a Countdown game program, using a class to generate letters. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Delegates and events |
Level: | Average difficulty |
Course: | |
Exercise: | Use a delegate in a class to move a form button right and down. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Laying out your code |
Level: | Average difficulty |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Use C# to customise a message box title and caption from form entries. |
Software: | Visual C# |
Version: | |
Topic: | Creating forms |
Level: | Average difficulty |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Create a form to allow someone to enter their name, choose their date of birth using a DateTimePicker and their preferences using a ComboBox. |
Software: | Visual C# |
Version: | |
Topic: | Validating forms |
Level: | Average difficulty |
Course: | |
Exercise: | Using ErrorProvider controls to check someone fills their age in correctly on a form. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Using lists |
Level: | Average difficulty |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Create a list of dates falling on the 13th, then reduce this to Fridays. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Grouping using LINQ |
Level: | Average difficulty |
Courses: | Fast track C#Intermediate C# |
Exercise: | Use LINQ grouping to show directors by their year of birth. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Using lists |
Level: | Average difficulty |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Read a text file line by line into a string list, then print it back out. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Writing LINQ |
Level: | Average difficulty |
Courses: | Fast track C#Intermediate C# |
Exercise: | Project a star sign class into an enumerable string list using LINQ. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | LINQ to SQL |
Level: | Average difficulty |
Course: | |
Exercise: | Use LINQ to SQL to show loss-making films, with their studios. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Files and folders |
Level: | Average difficulty |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Write code to loop over files, reading lines to find hidden text. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | C# variables |
Level: | Average difficulty |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | A user inputs their minimum required allowance - use variables to check this is a number, and within range. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | LINQ with Entity Frameworks |
Level: | Average difficulty |
Courses: | Fast track C#Intermediate C# |
Exercise: | Use a LINQ statement to populate a grid of events (returning an anonymous type). |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Advanced LINQ |
Level: | Average difficulty |
Courses: | Fast track C#Intermediate C# |
Exercise: | LINQ: list Mondays till Xmas using anonymous types and skipping items. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | DataGridView events |
Level: | Average difficulty |
Course: | |
Exercise: | Apply conditional formatting to rows of a a DataGridView by coding the CellFormatting event. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | DataGridView events |
Level: | Average difficulty |
Course: | |
Exercise: | Attach code to a DataGridView so that the CellValidating event prevents invalid entries (also includes setting the ErrorText property of a row). |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | FileDialogs and StreamReaders |
Level: | Average difficulty |
Course: | |
Exercise: | Use an OpenFileDialog to find files to search, then read them in with a StreamReader to find hidden text. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Validating forms |
Level: | Average difficulty |
Course: | |
Exercise: | Check the age of a person, and display an ErrorProvider control if it is not valid. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Data structures |
Level: | Average difficulty |
Courses: | Fast track C#Intermediate C# |
Exercise: | Create a shopping list, using a structure and a generic list. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Enumerations and constants |
Level: | Average difficulty |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Use project resources to hold and display an image and a string constant giving your name and photo. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Validating forms |
Level: | Average difficulty |
Course: | |
Exercise: | Attach code to the Validating event of a form to check textboxes are correctly filled in. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Looping |
Level: | Average difficulty |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Loop over a form's controls, checking the text boxes are filled in. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Conditions |
Level: | Average difficulty |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Add lots of validation code to a form to check all controls filled in. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | C# variables |
Level: | Average difficulty |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Display the sum of numbers entered in a calculator using variables. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | DataGridView events |
Level: | Average difficulty |
Course: | |
Exercise: | Ask a user if they really want to delete a row in a DataGridView, allowing event to cancel deletion if required. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Delegates and events |
Level: | Harder than average |
Course: | |
Exercise: | Use an event and delegate to get a button which monitors its pinkness. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | LINQ with Entity Frameworks |
Level: | Harder than average |
Courses: | Fast track C#Intermediate C# |
Exercise: | Populate two combo boxes in a form, and use criteria to list out events. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Properties in C# |
Level: | Harder than average |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Play snog, marry or avoid in C#, making heavy use of lists. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Interfaces |
Level: | Harder than average |
Course: | |
Exercise: | Play any game, using an interface to create a common PLAY method. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Creating classes |
Level: | Harder than average |
Courses: | Fast track C#Intermediate C# |
Exercise: | Play pairs: find identical owls in a grid by clicking, using classes. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Complex DataGridViews |
Level: | Harder than average |
Course: | |
Exercise: | Create a datagridview for mortgage applicants with a combobox bound to another table and a clickable button for each row. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Inheritance |
Level: | Harder than average |
Course: | |
Exercise: | Create labels and text boxes based on the same abstract class. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Complex DataGridViews |
Level: | Harder than average |
Course: | |
Exercise: | Create two linked forms, such that double-clicking on a record in a list on one form shows its details on another. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Arrays |
Level: | Harder than average |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Split array items into parts, extract dob, and find oldest person. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Data structures |
Level: | Harder than average |
Courses: | Fast track C#Intermediate C# |
Exercise: | Use a Stack and two classes to play the Tower of Hanoi game. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | LINQ to SQL |
Level: | Harder than average |
Course: | |
Exercise: | Update and insert authors and delete a book using LINQ to SQL. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Grouping using LINQ |
Level: | Harder than average |
Courses: | Fast track C#Intermediate C# |
Exercise: | Group (and reorder) films by studio using LINQ to SQL. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Coding form events |
Level: | Harder than average |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | A his-and-hers form: choose your gender from a droplist, and a WebBrowser displays a relevant website. |
Software: | Visual C# |
Version: | Any version of C# |
Topic: | Files and folders |
Level: | Harder than average |
Courses: | Introduction to Visual C#Fast track C# |
Exercise: | Loop over all files/folders recursively to find biggest file. |
You can search our full list of C# exercises here. Or why not learn to do them the right way on one of our classroom C# training courses in the UK, or on one of our live online C# courses wherever you are in the world?
This page has 0 threads
Add post