JOBSEEKER?

.NET Interview Questions

Practice for .NET interviews by solving TestDome questions. Our interview questions are used by more than 7,000 companies and 450,000 individual test takers.

Jobseekers: Certify Your Knowledge

Take a Certification Test

Companies: Use Our Tests for Screening

Buy a Pack Of Candidates

Need to practice your .NET Framework skills for an upcoming job interview? Try solving these .NET interview questions that test knowledge of LINQ, class modifiers, method overriding, and other skills. We’ll provide feedback on your answers, and you can use a hint if you get stuck.

These .NET interview questions are examples of real tasks used by employers to screen job candidates such as C# programmers, back-end developers, full-stack developers, and others that require solving problems by leveraging the utilities provided by the .NET Framework.

1. Integer

Easy  
.NET Class Library Public

Which statements are true for an int/Integer built in .NET data type?

(Select all acceptable answers.)

Solve Question

2. Inheritance

Easy  
.NET Class Modifiers Method Modifiers OOP Public

A class inherits a base class and it overrides a method from that base class.

Select all possible forms of the base class and its method:

(Select all acceptable answers.)

Solve Question

3. Crab Inheritance

Easy  
.NET Method Overriding OOP Public

Consider the following code:

C#

public class Crab 
{
    public virtual string PinchClaws()
    {
        return "clap clap";
    }
}

public class CoconutCrab : Crab
{
    public override string PinchClaws()
    {
        return "CLAP CLAP";
    }
}

VB.NET

Public Class Crab
    Public Overridable Function PinchClaws() As String
        Return "clap clap"
    End Function
End Class

Public Class CoconutCrab
Inherits Crab
    Public Overrides Function PinchClaws() As String
        Return "CLAP CLAP"
    End Function
End Class

Select the statements that are correct.

(Select all acceptable answers.)

Solve Question

4. Recycling Bin

Easy  
.NET LINQ Public

Consider the following code:

C#

public class RecyclingBin
{
    protected List<string> recyclables = new List<string>();
    
    public void Add(string recyclable)
    {
        if (recyclable.Split(' ').Length > 1)
        {
            recyclables.Add(recyclable);
        }
    }
    
    public List<IGrouping<string, string>> SortRecyclables()
    {
        return recyclables.GroupBy(recyclable => recyclable.Split(' ').First()).ToList();
    }
}

VB.NET

Public Class RecyclingBin
    Protected recyclables As List(Of String) = New List(Of String)
    
    Public Sub Add(recyclable As String)
        If recyclable.Split(" ").Length > 1
            recyclables.Add(recyclable)
        End If
    End Sub

    Public Function SortRecyclables()
        Return recyclables.GroupBy(Function(recyclable) recyclable.Split(" ").First()).ToList()
    End Function
End Class

Select the statements that are true if a new RecyclingBin is instantiated and the Add method is called with the following recyclable parameters: "metal pipe", "plastic toy", "metal bar", "copper wire", "plastic button", and "brass".

(Select all acceptable answers.)

Solve Question

5. Parsing XML

Hard  
.NET Class Library Serialization XML Public

Which statements are true for the .NET technologies you can use to process XML data?

(Select all acceptable answers.)

Solve Question

6. Add Table

Hard  
.NET Database Migrations Entity Framework New Public

Entity Framework is used in an application that manages stocks. The application has the following class diagram for the model and the database context:

Using code first migration we need to upgrade the models shown in the following class diagram:

What would happen on running the required migrations using the Package Manager Console?

(Select all acceptable answers.)

Solve Question

If you feel ready, take one of our timed public .NET Interview Questions tests:
C#

C# and .NET Online Test (Easy / Hard)

VB.NET

VB.NET and .NET Online Test (Easy / Hard)

Not exactly what you are looking for? Go to our For Jobseekers section.
Dashboard Start Trial Sign In Home Tour Tests Questions Pricing For Jobseekers