.NET Interview Questions

Want to become an expert in cracking .NET interview questions?

Start with practicing the questions below. Whether a question involves multiple choice or live coding, we will give you hints as you go and tell you if your answers are correct or incorrect.

After that, take our timed public .NET Interview Questions Test.

To use our service for testing candidates, buy a pack of candidates.


1. Integer
.NET Class library Public

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

(multiple correct answers possible)

Easy  
1min
   

2. Inheritance
.NET 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:

(multiple correct answers possible)

Easy  
2min
   

3. Crab Inheritance
.NET OOP Public New

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.

(multiple correct answers possible)

Easy 
3min
   

4. Recycling Bin
.NET LINQ Public New

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", and "plastic button".

(multiple correct answers possible)

Easy 
5min
   

5. Parsing XML
.NET Class library Public

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

(multiple correct answers possible)

Hard  
2min
   

If you feel ready, take one of our timed public .NET Interview Questions tests:
  • C# and .NET Online Test (Easy / Hard)
Not exactly what you are looking for? Go to our For Jobseekers section.