JOBSEEKER?

VB.NET Interview Questions

Practice for VB.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 Visual Basic .NET skills for an upcoming job interview? Try solving these Visual Basic .NET interview questions that test knowledge of arrays, serialization, inheritance, and other skills. We’ll provide feedback on your answers, and you can use a hint if you get stuck.

These Visual Basic .NET interview questions are examples of real tasks used by employers to screen job candidates such as VB.NET developers, back-end developers, full-stack developers, and others that require knowledge of the VB.NET programming language and the ability to use the .NET framework's class library.

1. Merge Names

Arrays
   
Easy  

Implement the UniqueNames method. When passed two arrays of names, it will return an array containing the names that appear in either or both arrays. The returned array should have no duplicates.

For example, calling MergeNames.UniqueNames({'Ava', 'Emma', 'Olivia'}, {'Olivia', 'Sophia', 'Emma'}) should return an array containing Ava, Emma, Olivia, and Sophia in any order.

VB.NET 16.0, .NET Framework 4.7  
 


  •   Example case: System.NotImplementedException at Module1.MergeNames.UniqueNames(String[] names1, String[] names2) in MergeNames.vb:line 6
  •   Each array has distinct names: System.NotImplementedException at Module1.MergeNames.UniqueNames(String[] names1, String[] names2) in MergeNames.vb:line 6
  •   Each array has duplicate names: System.NotImplementedException at Module1.MergeNames.UniqueNames(String[] names1, String[] names2) in MergeNames.vb:line 6
  •   Arrays have some names in common: System.NotImplementedException at Module1.MergeNames.UniqueNames(String[] names1, String[] names2) in MergeNames.vb:line 6


2. Folders

Serialization XML
   
Hard 

Implement a function FolderNames, which accepts a string containing an XML file that specifies folder structure and returns all folder names that start with startingLetter. The XML format is given in the example below.

For example, for the letter "u" and XML file:

<?xml version="1.0" encoding="UTF-8"?>
<folder name="c">
    <folder name="program files">
        <folder name="uninstall information" />
    </folder>
    <folder name="users" />
</folder>

the function should return "uninstall information" and "users" (in any order).

VB.NET 16.0, .NET Framework 4.7  
 


  •   Example case: System.NotImplementedException at Module1.Folders.FolderNames(String xml, Char startingLetter) in Folders.vb:line 8
  •   All folder names start with starting letter: System.NotImplementedException at Module1.Folders.FolderNames(String xml, Char startingLetter) in Folders.vb:line 8
  •   Root folder name starts with starting letter: System.NotImplementedException at Module1.Folders.FolderNames(String xml, Char startingLetter) in Folders.vb:line 8
  •   Complicated folder structure: System.NotImplementedException at Module1.Folders.FolderNames(String xml, Char startingLetter) in Folders.vb:line 8


3. User Input

Inheritance OOP
   
Easy 

User interface contains two types of user input controls: TextInput, which accepts all characters and NumericInput, which accepts only digits.

Implement the class TextInput that contains:

  • Public sub Add(c As Char) - adds the given character to the current value
  • Public function GetValue() As String - returns the current value

Implement the class NumericInput that:

  • Inherits TextInput
  • Overrides the Add method so that each non-numeric character is ignored

For example, the following code should output "10":

Dim input As TextInput = New NumericInput()
input.Add(CChar("1"))
input.Add(CChar("a"))
input.Add(CChar("0"))
Console.WriteLine(input.GetValue())
VB.NET 16.0, .NET Framework 4.7  
 


  •   Example case: System.InvalidCastException
  •   Adding various characters to TextInput: System.NullReferenceException
  •   Adding numeric characters to NumericInput: System.InvalidCastException
  •   Adding various characters to NumericInput: System.InvalidCastException


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

VB.NET Online Test (Easy / Hard)

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

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

HTML/CSS

HTML/CSS, JavaScript, VB.NET, and SQL 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