• +91 9723535972
  • info@interviewmaterial.com

VB.Net Interview Questions and Answers

VB.Net Interview Questions and Answers

Question - 81 : - Explain garbage collection in VB.NET? State the advantages of garbage collection.

Answer - 81 : -

The garbage collector in VB.NET regulates memory allocation and release for your application. When you create a new object, the managed heap is used to allocate memory for it via the common language runtime. The runtime continues to allocate space for new objects as long as address space in the managed heap is available. Memory, on the other hand, is finite. In order to liberate some memory, the garbage collector must eventually complete a collection. Based on the allocations being made, the garbage collector's optimising engine calculates the optimal moment to do a collection. When the garbage collector does a collection, it searches the managed heap for objects that are no longer in use by the application and executes the appropriate procedures to free up their memory. The garbage collector (GC) is an automatic memory manager in the Common Language Runtime (CLR). The garbage collector is in charge of managing an application's memory allocation and release. This means that you do not have to create code to handle memory management duties if you are dealing with managed programs. Automatic memory management can solve problems like forgetting to free an item, resulting in a memory leak, or trying to access memory for an object that has already been freed.

A few advantages of garbage collection are as follows:

  • It eliminates the need for developers to manually release memory.
  • Objects are efficiently allocated on the controlled heap.
  • Objects that are no longer in use are reclaimed, their memory is cleared, and the memory is made available for future allocations. Managed objects come with clean content out of the box, so their builders don't have to worry about filling in every data field.
  • Provides memory safety by ensuring that an object cannot use memory assigned to another object for its own purposes.

Question - 82 : -
What Are The Properties Should Be Given To Set Method?

Answer - 82 : -

Class Class1
' Define a local variable to store the property value.
[Ans: Only One Property.
example:
Private PropertyValue As String
' Define the property.
Public Property Prop1() As String
Get
' The Get property procedure is called when the value
' of a property is retrieved.
Return PropertyValue
End Get
Set(ByVal Value As String)
' The Set property procedure is called when the value
' of a property is modified.
' The value to be assigned is passed in the
' argument to Set.
PropertyValue = Value
End Set
End Property
End Class

Question - 83 : - How Can We Assigns Items On Listbox So That It Will Show Rowwise Please Write The Code For It.

Answer - 83 : -

  • Lisbox1.Items.Add "Prashant"
  • Lisbox1.Items.Add "Chinchu"
  • Lisbox1.Items.Add "Pallavi"
  • Lisbox1.Items.Add "Suresh"
  • Lisbox1.Items.Add "Polika"

Question - 84 : - How Do You Validate Date By Using Which Validation Control?

Answer - 84 : -

runat="server"
ValidationExpression="^\d{2}[\/-]\d{2}[\/-]\d{2,4}$"
ErrorMessage="It is not a valid date"
ControlToValidate="txtpatientvisitdate"
EnableClientScript="False"
Display="Dynamic">

Question - 85 : - What Does Vs.net Contains ?

Answer - 85 : -

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.

Question - 86 : - How Do You Rate Yourself In .net ?

Answer - 86 : -

Based on Framework understanding and OOPS Concepts,Use of Different Component Library.

Question - 87 : - What Is Intermediate Language In .net ?

Answer - 87 : -

.net supports CLS i. e. Common language type. its a microsoft’s feature to bring all languages near one roof. When You compile .net code it doesn't converted into binary language, it converted into IL (Intermediate Language) also known as MSIL. And from IL to binary language converted at run time, CLR manages this process. At the runtime also it not converts whole project at time to binary, only converts that part which is going to execute, this the performance of project increases. This IL can use any language which is member of that .net studio. The assemblies (ExE, DLL) are also in IL form. So u can use any EXE or DLL created in vb.net in c#.net also.[which converts native code into byte code i.e machine understandable code.]

Question - 88 : -
Is Vb.net Object Oriented? What Are The Inheritances Does Vb.net Support ?

Answer - 88 : -

yes VB.NET ia an object oriented.Vb.net supports all inheritance
1)single inheritance
It means Single class inheriting to single child classes
2)multiple inheritance
multiple classess inherits to single classes
3)Multilevel Inheritance
Single class inherits to one class that class inheritd to single another class
4)Heirarichal inheritance
Single class inherits to Multiple classes
5)Hybrid Inheritance
Single class inherits to different classess and that classes inherits to one class.

Question - 89 : - Difference Between Vb Dll And Assemblies In .net ?

Answer - 89 : -

Assemblies can contain DLL and EXE both. Different versions of one DLL can be handled by assemblies. They overcome the DLL Hell problem. Assemblies Contain Manifest and Meta Data files. These are the separate files that describes the Assembly and its attributes. VB DLL is inprocess.DLL run with an exe where as DLL are not self executable.
we can reuse DLLs .DLL are not platform independent If we have more then one Versions of a DLL we can face DLL Hell Problem.

Question - 90 : - How Do You Do Multithreading Application In Vb ?

Answer - 90 : -

VB doesn't support multithreading.
[Its the fastest and an excellent application provided in VB.net. Due to which many operations can be done without any lapse of time. The system need not wait for an application or any task to get completed, rather it runs simultaneously.]


NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners