C# & .NET Online Test

20 questions total, 50 minutes maximum, for mid-level programmers


The C# coding test allows you to easily assess the programming skills of candidates before ever inviting them to an interview.

This 20-question C# online test was compiled by a team of professional .NET developers and covers a broad spectrum of C# language knowledge. You can rely on the results of this exam to give you an accurate picture of which candidates might be worth hiring and which ones to pass on.

We hope you'll take advantage of the C# quiz to improve your interview process!


Programming test includes:

C# & .NET - 20 Questions

  • C# Syntax, C# Statements: "try-catch", "using"
  • Object-Oriented Programming (OOP)
  • Entity Framework, LINQ to SQL
  • Value Types vs. Reference Types
  • Miscellaneous: Generics, Delegates, Extensions
  • Miscellaneous: Structs, Singleton Pattern, Direct Cast vs "As" Operator

Custom Branding

Do you want the C# & .NET coding test to match your own branding?

No problem! Use your company's domain and logo without any mention of Tests4Geeks.

Your applicants will think these programming assessment tests are all yours!

Branding


"They totally blow away the competition as far as a better product value."

Maurice H. on Capterra.com

Branded PDF Report

Are you recruitment firm? Send your clients branded reports of your candidates.

You'll make a great impression!

Reports are provided in PDF format, making them easy to read, share and print.

C# & .NET Test Report


Sample C#/.NET Test Question

Consider the following C# code, which retrieves customers' information and their total purchase amounts from an MS SQL Database using the Entity Framework:

C# Test Questions

How many SQL queries will be executed against the database?

Answers

  1. One query
  2. Two queries
  3. Three queries

The correct answer is one query.

Answer explanation

Both the GetCustomers and GetSales methods are IQueryable. This means they return query expressions, not actual collections.

As a result, we execute a single complex query against the database (when .ToList() is called) instead of retrieving two collections separately and joining them server-side.

Why this question is important

This C# test question proves a developer's understanding of the difference between the IQueryable and IEnumerable interfaces.

It's important for C# developers to understand how the Entity Framework and LINQ to SQL interact with an SQL database.

Wrong built LINQ-To-SQL queries and misunderstanding of the differences between IQueryable and IEnumerable can cause serious performance issues, such as:

  1. Retrieving too much data from the SQL database; e.g. retrieving all rows from a table when only 20 entries are actually displayed at a time.
  2. Executing too many queries against the database; e.g. retrieving a list of customers, then executing individual queries to retrieve each customer's purchases.
  3. Executing overly complex queries against the database. If a query is too complex, you can actually get time-out exception. Sometimes it's preferable to split a complex query into two or more sub-queries and handle them further server-side.

F.A.Q.

1. Does every candidate have to answer the same questions?

Yes. C# & .NET test consists of the same questions for every candidate.

In order to properly compare candidates, they need to answer questions of the same difficulty level, and different questions always mean different difficulty levels.

However, the order of questions and answers is randomized for each applicant.

2. How should I interpret the exam scores?

First of all, you need to keep in mind one very important thing:

The purpose of this C# & .NET online test is not to help you find the best developers.

Its purpose is to help you avoid the worst ones.

For example, you have 5 candidates who get scores of 35, 45, 60, 65, and 80, based on a maximum possible score of 100.

We would recommend you invite the last three (those scoring 60, 65, and 80) to a live interview, not just the one who scored an 80/100.

3. Coding Test vs. Quiz

The test is presented in a multiple-choice, or quiz, format, rather than requiring test takers to write code.

If we used a coding test instead, we would have to check all answers manually, which would obviously be impossible.

4. What skill level is the test for?

The test is primarily created for mid-level developers.

5. What about junior and senior level developers?

The test can also be used to test junior programmers, but you should reduce your acceptance score drastically to compensate.

Likewise, you can use it to test senior .NET developers as well, with an increased acceptance score.

Some will argue that it's pointless to judge senior developers based on a test meant for mid-level developers. This is generally true if you're looking for specific skills in a candidate rather than a broad base of expertise.

But at the same time, anyone can claim to be a senior developer on their resume. If you're concerned that candidates might be overstating their knowledge and accomplishments, this C# & .NET skills test is a good way to determine which ones can actually deliver what they promise.