VB.Net Interview Questions and Answers
Question - 61 : - What is the class that allows an element to be accessed using Unique key?
Answer - 61 : -
Hash table is the collection class that allows an element to be accessed using Unique key.
Question - 62 : - What is Code Security?
Answer - 62 : -
.NET framework provides security features to secure code from unauthorized users. There are two types of security in .NET:
- Role based security – Authorizes User
- Code access security – Protects system resources from unauthorized calls
Question - 63 : - Which DLL Is used for Microsoft .NET run time?
Answer - 63 : -
Mscoree.dll is used for Microsoft .NET runtime DLL.
Question - 64 : - How many classes a DLL can contain?
Answer - 64 : -
Unlimited number of classes can be present in a DLL.
Question - 65 : - How can we store decimal data in .NET?
Answer - 65 : -
BinaryWriter is used to store decimal data in .NET.
Question - 66 : - What is deep copy?
Answer - 66 : -
Deep copy is nothing but creating a new object and then copying the non-static fields of the current object to new object.
Question - 67 : - State some advantages of using VB.NET.
Answer - 67 : -
Some benefits of using VB.NET are as follows:
- VB.NET is a modern, general-purpose language.
- It is an object-oriented programming language.
- For a newbie, VB.NET is quite simple to learn.
- It is a structure-oriented programming language.
- VB.NET can be built on a number of different platforms.
- Conditional Compilation is supported by VB.NET.
- VB.NET has a Standard Library and Automatic Garbage Collection.
- It has Property and Event support.
- VB.NET aids in the management of delegates and events.
- Generics, Indexers, and Simple Multithreading are all supported.
Question - 68 : - In the .Net Framework, what is the INTERNAL keyword?
Answer - 68 : -
An access specifier that will be displayed in a specific assembly, that is, in a DLL (Dynamic Link Library) file, is the INTERNAL keyword. This is visible throughout the assembly as a unique binary component.
Question - 69 : - Explain the usage of the NEW keyword with an example.
Answer - 69 : -
The constructor is used along with the NEW keyword. Its usage can be as that of a modifier or an operator. The NEW keyword hides inherited members from base class members when used as a modifier. It produces objects for invoking constructors when used as an operator. The NEW keyword creates a new object instance, provides a constructor constraint on a type argument, or designates another function as a class constructor. A New clause can be used in either a declaration or an assignment statement. When you run the statement, it calls the proper constructor of the specified class, passing any parameters you have given it.
An example of the usage of the NEW keyword is given below:
Dim teacher1 As New Teacher()
Question - 70 : - What are class access modifiers?
Answer - 70 : -
Keywords that are used to specify the declared accessibility of a member or a type is known as class access modifiers. The various types of class access modifiers are as follows:
- Public
- Private
- Protected
- Protected Internal
- Internal