What is VB.NET?
VB.Net is a simple, modern, object-oriented computer programming language developed by Microsoft to combine the power of .NET Framework and the common language runtime with the productivity benefits that are the hallmark of Visual Basic. According to Microsoft, VB .NET was reengineered, rather than released as VB 6.0 with added features, to facilitate making fundamental changes to the language. VB.NET is the first fully object-oriented programming (OOP) version of Visual Basic, and as such, supports OOP concepts such as abstraction, inheritance, polymorphism, and aggregation.
What is visual basic?
Visual basic is associated with the IDE of Microsoft. It is basically useful to implement RAD of GUI. Creation of Active X scripts are very easy and efficient through VB. Windows API can also be used to create application on windows desktop and its applications. This was primarily designed to create applications for windows platform
What is Microsoft .Net Framework?
The Microsoft .Net Framework is a platform that provides tools and technologies you need to build Networked Applications as well as Distributed Web Services and Web Applications. The .Net Framework provides the necessary compile time and run-time foundation to build and run any language that conforms to the Common Language Specification (CLS).The main two components of .Net Framework are Common Language Runtime (CLR) and .Net Framework Class Library (FCL).
What are new features of Visual Basic?
n Visual Basic 15.3 and earlier versions, when a method call included arguments both by position and by name, positional arguments had to precede named arguments. Starting with Visual Basic 15.5, positional and named arguments can appear in any order as long as all arguments up to the last positional argument are in the correct position. This is particularly useful when named arguments are used to make code more readable.
Some basic features id VB:
- Assemblies
- Namespaces
- Attributes
- Adding references
- Multithreading
- Structured exception handling
- Windows forms
- Inheritance
- Tuples
- New IDE Features
What's New in Visual Studio 2017?
- Redefined fundamentals.
- Performance and productivity.
- Cloud app development with Azure.
- Windows app development.
- Mobile app development.
- Cross-platform development
- AI development.
- Games development.
- Experience live unit testing
What do you mean by Redim in VB.NET?
In vb.net we use Redim and erase to manipulate Array. Once we declare an array the size set to array its makes limited to that range but with the help of redim we used to change the array size.
Redim arr(6)
we can also use preserve to save these values.
Redim Preserve arr(6)
What would you do to remove Microsoft visual basic name space?
.NET has many new features and application supportive tools.
- To remove Microsoft visual basic name space all you have to do is to
- Remove the import manually every time you start the project.
- Creating a template which does not contain Microsoft Visual Basic namespace.
- About new features and changes names you can refer to MSDN.
Write the role of new keyword?
New is used to initialize a new object. We set a variable to any datatype with help of New keyword. The New keyword gives a value to the variable. We can also uses new keyword to initialize an object variable. Example: – dim obj as new SqlDataAdapter.
What is Tuple in Visual Basic?
In Visual Basic, a tuple is a light-weight data structure that has a specific number and sequence of values. When you instantiate the tuple, you define the number and the data type of each value (or element). For example, a 2-tuple (or pair) has two elements. The first might be a Boolean value, while the second is a String. Because tuples make it easy to store multiple values in a single object, they are often used as a lightweight way to return multiple values from a method.
What are Option Strict and Option Explicit?
Option Explicit: By default, the Visual Basic .NET or Visual Basic compiler enforces explicit variable declaration, which requires that you declare every variable before you use it. To change this default behavior, see the Change the Default Project Values section.
Option Strict: By default, the Visual Basic .NET or Visual Basic compiler does not enforce strict data typing. To change this default behavior, see the Change the Default Project Values section.
What is the difference between System.String and System.StringBuilder classes?
System.string class is non-updatable and it will create new string object instead of updating the same. But updation in the same string object is possible for String. Stringbuilder class. So, the operation on string builder is faster and efficient than the string class.
What is a delegate?
A delegate is a reference type that refers to a Shared method of a type or to an instance method of an object. Delegate is like a function pointer in C and C++. Pointers are used to store the address of a thing. Delegate lets some other code call your function without needing to know where your function is actually located. All events in .NET actually use delegates in the background to wire up events. Events are really just a modified form of a delegate.
Can you define TRACE in VB.Net?
TRACE allows the user to view how the code has been executed in detail.
Can you define Delegate?
A delegate is defined as an object that can refer to a method. Whenever a delegate is assigned to a method, it behaves exactly like that method.
Can you define nested classes?
A class that can be declared within the scope of another class. These classes are considered within the scope of the enclosed class and are available within that class or scope.
What are the various open source tool available for VB.NET?
When compared with the rapid development of open source tools for other languages from Microsoft (C#, etc) we can say that development of tools for VB has been slow. Mono development platform is one which is implementing VB libraries and is working on a compiler
Can you explain widening conversion and narrowing conversion?
Widening conversion: A widening conversion changes a value to a data type that can allow for any possible value of the original data. Widening conversions preserve the source value but can change its representation. This occurs if you convert from an integral type to Decimal, or from Char to String.
Narrowing conversion: A narrowing conversion changes a value to a data type that might not be able to hold some of the possible values. For example, a fractional value is rounded when it is converted to an integral type, and a numeric type being converted to Boolean is reduced to either True or False
Can you explain implicit conversion and explicit conversion?
Implicit conversion: It does not require any special syntax in the source code. In the following example, Visual Basic implicitly converts the value of k to a single-precision floating-point value before assigning it to q.
Explicit conversion: It uses a type conversion keyword. Visual Basic provides several such keywords, which coerce an expression in parentheses to the desired data type. These keywords act like functions, but the compiler generates the code inline, so execution is slightly faster than with a function call.
What are the conditions of Array Conversions?
Equal Rank: The ranks of the two arrays must be the same, that is, they must have the same number of dimensions. However, the lengths of the respective dimensions do not need to be the same.
Element Data Type: The data types of the elements of both arrays must be reference types. You cannot convert an Integer array to a Long array, or even to an Object array, because at least one value type is involved.
Convertibility: A conversion, either widening or narrowing, must be possible between the element types of the two arrays. An example that fails this requirement is an attempted conversion between a String array and an array of a class derived from System. Attribute. These two types have nothing in common, and no conversion of any kind exists between them. (See Microsoft Doc))
What is the differences between Dispose and Finalize ()?
Finalize method is called by Garbage collector which helps us to make free of unmanaged resources. There are some other resources like window handles, database connections are handled by iDisposable interface.
Dispose method is handled by IDisposable interface to explicitly release unused resources. Dsipose can be called even if other references to the object are alive.
Can you explain Authentication and Authorization?
Authentication is the process of obtaining credentials from the users and verifying the user’s identity.
Authorization is the process of giving access to the authenticated resources. Authentication leads to Authorization.
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 VB.NET DateTimePicker control?
It represents a Windows control that allows the user to select a date and a time and to display the date and time with a specified format.
What is ByRef keyword in VB.NET?
It is specifying that an argument is passed by reference, i.e., the called procedure can change the value of a variable underlying the argument in the calling code. It is used under the contexts of −
- Declare Statement
- Function Statement
- Sub Statement
Can you define CLR?
 CLR (Common Language Runtime) .it forms heart of the .NET framework. It is the responsibility of runtime to take care of the code execution of the program. CLR takes care of the following:
- Garbage Collection
- Code Verification
- Code Access Security
- IL (Intermediate Language)
What is Global Assembly Cache (GAC)?
GAC is used where shared .NET assembly resides. It is used in the following criteria:
If .Net assembly has special security requirements
If .Net application has to be shared with other applications
What is Code Security?
.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
Can you explain the difference between thread and process?
Thread is used to execute more than one program at a time. Whereas, Process executes single program at a time.
Can you define Globalization?
Globalization is nothing but making the application Internationalize and localizing the application to other languages or cultures. Culture is nothing but a combination of Language (English) and the location like US or UK.
Can you explain the types of generations in garbage collector?
There are three types of generations in garbage collector.
- Generation 0: It is identifying a newly created object that has been never marked for collection.
- Generation 1: It is identifying an object which has been marked as collection but not removed.
- Generation 2: It is identifying an object that has survived more than one sweep of the Garbage collector.
Â