VB.NET Interview Questions and Answers
Q1. What is ASP Net and VB Net?
ASP.Net is a Web Development SDK/Framework. You write code in a programming language and you use a SDK to speed up development. .Net is a framework which you use when programming in vb.net, C# or any other language which can be compiled into msil.
Q2. What is the difference between VB 6.0 and VB Net?
VB had its own runtime, where VB.NET is one of many languages that use the more modern .NET Framework. The greatest change in VB6 and VB.NET is of runtime environment. VB6 used the VB-Runtime while VB.NET uses the .Net Common Language Runtime (.Net CLR). The CLR is much better designed and implemented than VB-Runtime.
Q3. What are all the parts of .Net Framework?
- Common Language Runtime
- .Net Framework Class Library
Q4. What’s the difference between private and shared assembly?
Private assembly is used inside an application only and does not have to be identified by a strong name.
Shared assembly can be used by multiple applications and has to have a strong name.
Q5. What is the default value for Boolean variable in VB.NET?
The default boolean value is False in VB.Net
Q6.What Does Vs.net Contains ?
Visual Studio .Net is basically a framework which makes easy development of codes written in Various programming languages.. It contains two things
1.Framework Class Library: It contains various classes managed within various namespaces.
2.Common Language Runtime: CLR is the execution engine which helps in compiling the IL code into machine code,takes care of security issues and many other critical tasks.Web pages, windows apps, console applications, Class libraries are various options which can be created using VS.net.
Q7. What Is Versioning In .net?
main advantage of .net is versioning and solve very critical problem.
.net maintain one application with more then one version and also solve DLL HELL problem because it can run same application with different version at a same time[.Net have an Assembly. It gives the Portable Execution file.The main use of assembly is to maintain the Dll and exe’s.
So sometimes the programmer confused to which is modified code.That time the assembly provide the Version.That is called versioning. It is start from 1.0.*,…….]
Q8. What are the advanatages of VB.NET
- VB.NET is totally object oriented. This is a major addition that VB6 and other earlier releases didn’t have.
- Handling Pointers indirectly – This provides less opportunity of instability in the produced application; aka produced applications are more secure and stable.
- With Option Strict off late binding is supported.Legacy VB functionalities can be used by using Microsoft.VisualBasic namespace.
- VB.NET provides managed code execution that runs under the Common Language Runtime (CLR), resulting in robust, stable and secure applications. All features of the .NET framework are readily available in VB.NET.
- Has support for optional parameters which makes COM interoperability much easy.
- VB.NET uses XML to transfer data between the various layers in the DNA Architecture i.e. data are passed as simple text strings.
- The CLR takes care of garbage collection i.e. the CLR releases resources as soon as an object is no more in use. This relieves the developer from thinking of ways to manage memory. CLR does this for them
Q9. What is entry point method of VB.NET program?
Public Sub Main() indicates the entry point of VB.Net program.
Q10. What is the use of console application?
Console Applications are command-line oriented applications that allow us to read characters
from the console, write characters to the console and are executed in the DOS version. Console
Applications are written in code and are supported by the System. Console namespace.
Q11. What are class access modifiers?
Access modifiers are keywords used to specify the declared accessibility of a member or a type. This section introduces the four access modifiers :
- Protected inertnal
Q12. What is TRACE in VB.Net?
TRACE allows the user to view how the code has been executed in detail.
Q13. Enlist Controls in Windows Forms to Select Data from a list of VB.NET.
The Windows Forms Controls to Select Data from a List are as follows:
4. List Box
5. List View
Q14. What is Object Oriented Programming Approach?
Object Oriented Programming provides a way of modularizing programs by creating partitioned memory area for functions as well as data that can be used as templates for creating copies of such modules on demand. OOP allows decomposition of a problem into a numerous entities called Objects. It then builds data and functions around these objects.
Q15. Is it possible Vb.Net classes derived in C# ?
Since VB.Net Adheres to Common Type system it is possible to derive a class written in VB.Net in C#.
Q16. How do you trigger an event in VB.NET?
You should send a button as sender into the event handler:
btnStart_Click(btnStart, New EventArgs())
Q17. What is Garbage Collection?
Garbage Collection is primarily used for Memory Management. The .NET Framework’s Garbage Collection manages the allocation and release of the memory to your applications. The garbage collector checks for objects in the managed heap that are no longer being used by the applications when it performs garbage collection.
Q18. What is the difference between .dll extension and .exe extension files?
The main difference between .dll and .exe is
.dll is the In process component where it take up the client’s memory space to run. So the communication between the application and component(dll) is very fast.
.EXE is the Out of process component. It uses its own memory(not application memory) to run the component. The communication between the application and component is slow when compared to .dll
Q19. Explain Protected Friend Access Modifier in VB.NET.
The Protected and Friend keywords together in the declaration statement specify that the elements within the same assembly or both.
Example:Protected Friend demoString As String
It can be used only at class level but not at level of Source File or Namespace or inside an Interface, Module, Structure or Procedure.
Q20. Difference between VB mdi form and .Net mdi form?
In VB MDI form is created by adding MDI Form to the project and adding child forms by setting MDICHILD property of the child form.
In .NET there is no MDI form, any form can be made a MDI parent by setting IsMdiContainer property to TRUE.
Q21. What are Shared Assemblies?
When private assembly is installed in Global Assembly Cache, it is called as Shared Assembly. It does not create any physical copy and when the Assembly is installed in GAC, it can be referred to any .NET application.
Q22. Can you create a function in VB.NET which can accept varying number of arguments?
By using the params keyword, a method parameter can be specified which takes a variable number of arguments or even no argument.
Q23. How does CAS work?
The CAS security policy revolves around two key concepts – code groups and permissions. Each .NET assembly is a member of a particular code group, and each code group is granted the permissions specified in a named permission set
Q24. What is Assembly Manifest?
Every Assembly contains an Assembly Manifest. It consists of the following:
1. The Assembly’s Identity (Name and Version)
2. File Table describing all other files that make up the assembly.
3. Assembly Reference List that contains information about External Dependencies.
4. Global Objects
Q25. Explain .NET compilation process.
- Compilation of source code to managed code / Intermediate Language (IL).
- Compilation of IL to platform-specific code by the CLR.
- MSIL defines a set of portable instructions which are independent of any specific CPU.
Q26. Enlist the Garbage Collection Methods in .NET Framework.
The .NET Framework garbage collection methods are as follows:
September 20, 2019
January 29, 2019
May 26, 2018