VB.Net Questions & Answers
What is Manifest?
A Manifest is a text file that is used to store metadata information of .NET assemblies. File type of Manifest can be saved as a type PE. Assembly Name, Version, Culture and key token can be saved as a Manifest.
What is Metadata?
it is explained as “Data about content of the data” and it is found in the catalog of libraries. Practically, it is used at back side of book to see the necessary topic.
What is the difference between VB and VB.Net?
These are the differences between VB and VB.Net:
VB
VB.Net
Platform dependent Platform Independent
VB is backward compatible VB.Net is not backward compatible
Interpreted Compiler Language
Exception Handling by ‘On Error…..Goto’ Exception Handling by ‘Try….Catch’
Cannot develop multi-threaded applications Can develop multi thread applications
What is the difference between C# and VB.Net?
Following table gives differences between C# and VB.Net:
VB.Net C#
Optional Parameters are accepted Optional Parameters are not accepted
Not case sensitive Case Sensitive
Nothing is used to release unmanaged resources ‘Using’ is used to release unmanaged resources
Support of Both structured and unstructured error handling Unstructured error handling
What is namespace?
A namespace is an organized way of representing Class, Structures and interfaces present in .NET language. Namespaces are hierarchically structured index of a class library, available to all .NET Languages.
Which namespace are used for accessing the data?
System.Data namespace is used for accessing and managing data from the required data source. This namespace deals only with the data from the specified database.
What is JIT?
JIT is termed as Just in Time compiler which is used as a part of runtime execution environment. There are three types of JIT and they are:
Pre-JIT – Compiles at the time of deployment of an application
Econo-JIT – Compiles called methods at runtime
Normal JIT – Compiles called methods at runtime and they get compiled first time when called
What is an assembly and its use?
An assembly is one of the elements of a .NET application and it termed as a primary unit of all .NET applications. This assembly can be either DLL or executable file.
What is strong name in .NET assembly?
Strong Name is an important feature of .Net and it is used to identify shared assembly uniquely. Strong name has solved the problem of creating different object with same name and it can be assigned with the help of Sn.exe.
What are the different types of assembly?
There are two types of assembly –
Private – A private assembly is used by only a single application and it is stored in application’s directory.
Public – A public assembly or shared assembly is stored in Global Assembly Cache(GAC) which can be shared by many applications
What is difference between Namespace and Assembly?
Assembly is physical grouping of all units and Namespace logically groups classes. Namespace can have multiple assemblies.
What is INTERNAL keyword in .Net Framework?
INTERNAL keyword is one of the access specifier which will be visible in a given assembly i.e. in a DLL file. This forms a single binary component and it is visible throughout the assembly.
What are Option Strict and Option Explicit?
.Net generally allows implicit conversion of any data types. In order to avoid data loss during data type conversion, Option Strict keyword is used and it ensures compile time notification of these types of conversions.
Option Explicit is the keyword used in a file to explicitly declare all variables using declare keywords like Dim, Private, Public or Protected. If undeclared variable name persists, an error occurs at compile time.
What is the use of New Keyword?
New keyword is used with the constructor in which it can be used as a modifier or an operator. When it is used as a modifier, it hides inherited member from the base class member. When it is used as an operator, it creates an object to invoke constructors.
Dim frm As New Form1
frm.show()
What is ReDim keyword and its use?
Redim keyword is exclusively used for arrays and it is used to change the size of one or more dimensions of an array that has been already declared. Redim can free up or add elements to an array whenever required.
Dim intArray(7, 7) As Integer
ReDim Preserve intArray(7, 8)
ReDim intArray(7, 7)
What is jagged array in VB.Net?
Jagged array is nothing but an array of arrays. Each entry in the array is another array that can hold any number of items.