0% found this document useful (0 votes)
37 views8 pages

Gad Viva Questions

VB.Net language imp

Uploaded by

Cricket Lover
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views8 pages

Gad Viva Questions

VB.Net language imp

Uploaded by

Cricket Lover
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

GAD VIVA QUESTIONS

1. What is VB.Net.
GUI (Graphical User Interface) application development using VB.NET
involves creating applications with visual elements such as windows, buttons,
textboxes, labels, and other controls to interact with users. VB.NET is a
programming language that is part of the .NET framework, primarily used for
building Windows applications.
2. What are the Modules in VB.Net.
In VB.NET, a module is a container for code that can include variables,
functions, and subroutines. Modules provide a way to organize and structure
your code, making it more manageable and easier to maintain.
3. What are garbage collection in VB.Net.
Garbage collection in VB.NET, as well as in other .NET languages, is a
mechanism for automatic memory management. It works by reclaiming
memory that is no longer being used by objects in your application, allowing
that memory to be reused for other purposes.
4. What are the features of VB.Net.
VB.NET (Visual Basic .NET) is a versatile programming language that
offers a wide range of features for building various types of applications. Here
are some of the key features of VB.NET:
1. Object-Oriented Programming (OOP)
2. Rapid Application Development (RAD)
3. Exception Handling
5. What are the advantages of .Net.
.NET is a versatile and powerful development platform with numerous
advantages that make it a popular choice for building a wide range of
applications. Here are some of the key advantages of .NET:
1. Language Independence: C#, Visual Basic .NET (VB.NET), F#, and more.
2. Security: .NET includes built-in security features such as code access security,
role-based security, and cryptographic services, which help protect applications
from unauthorized access, data breaches, and other security threats.
3. Scalability: .NET applications are inherently scalable, thanks to features like
multi-threading, asynchronous programming, and support for distributed
computing.
6. Explain VB.Net IDE.
The VB.NET IDE (Integrated Development Environment) refers to the
software environment provided by Microsoft for developing applications using
the Visual Basic .NET programming language. The primary IDE for VB.NET
development is Microsoft Visual Studio.
7. What are the events in VB.Net?
In VB.NET, events are actions or occurrences that happen during the
execution of a program, typically triggered by user interactions or system
events. Events are used to handle user input, respond to changes in the
application state, and perform various tasks.
Form Events
Timer Events
Keyboard and Mouse Events
8. What are the datatype in VB.Net ?
A datatype, in the context of programming, defines the type of data that
a variable can hold.
Primitive Data Types:
 Boolean: Represents a Boolean value (True or False).
 Byte: Represents an 8-bit unsigned integer value (0 to 255).
 Char: Represents a single Unicode character.
 Date: Represents a date and time value.
 Decimal: Represents a decimal value with up to 28 significant digits.
 Double: Represents a double-precision floating-point value.
Non-Primitive Data Types:
 String: Represents a sequence of characters.
 Object: Represents an instance of an object.
 Array: Represents a collection of elements of the same type stored
sequentially in memory.

9. What are operator in VB.Net.


Operators in VB.NET are symbols or keywords that perform operations
on operands (variables, constants, or expressions) to produce a result. VB.NET
supports a wide range of operators for arithmetic, comparison, logical, bitwise,
assignment, and other operations. Here's an overview of the various types of
operators in VB.NET:
Arithmetic Operators:
 Addition (+)
 Subtraction (-)
 Multiplication (*)

Comparison Operators:
 Equal to (=)
 Not equal to (<>)
 Greater than (>)

Logical Operators:
 Logical AND (And)
 Logical OR (Or)
 Logical NOT (Not)

10. What are the conditional making statement in VB.Net.


If...Then...Else Statement:
Nested If Statements:
Select Case Statement:
11. What are loops in VB.Net?
For Next Loop:
For Each Loop:
While Loop:
Do While Loop:
12. What are the function in console application?
Main Function : Sub Main() …….. End Sub
User-Defined Functions:
13. What are various control in VB.Net.
In VB.NET, controls are visual elements that you can add to forms or
other containers to create user interfaces for your applications. These controls
allow users to interact with the application and provide feedback to the user.
Here are some of the commonly used controls in VB.NET:
1. Label
2. TextBox
3. Buttons
4. ComboBox
5. ListBox
6. CheckBox
7. RadioButton

14. Explain Properties of each & every control.

1. Label: Used to display text or images on a form. Labels are typically used
for static text that does not change during runtime.
2. TextBox: Allows users to input and edit text. TextBox controls are
commonly used for capturing user input, such as names, addresses, or other
textual data.
3. Button: Represents a clickable button that users can interact with by
clicking or pressing Enter. Buttons are often used to trigger actions or
submit forms.
4. ComboBox: Provides a dropdown list of items from which users can select
one option. ComboBox controls are useful for presenting a list of choices to
the user.
5. ListBox: Displays a list of items from which users can select one or more
options. ListBox controls are commonly used for displaying and selecting
items from a list.
6. CheckBox: Represents a checkbox that users can toggle on or off.
CheckBox controls are used to enable or disable options or settings.
7. RadioButton: Presents a set of mutually exclusive options from which
users can select one. RadioButton controls are often used in groups to allow
users to choose one option from a list.

15. Explain functions in VB.Net.


In VB.NET, a function is a block of code that performs a specific
task and returns a value to the caller. Functions are used to encapsulate a
set of instructions that can be reused throughout the program. They help
improve code organization, readability, and maintainability by breaking
down complex tasks into smaller, modular components.

16. Explain Class & Object.


Think of a class as a blueprint or template for creating something.
For example, consider a blueprint for a car. It specifies what features the
car will have, such as the number of wheels, the color, the size, and so
on. In programming, a class defines the structure and behavior of an
object.
An object is an instance of a class. Going back to our car analogy, if
a class is a blueprint for a car, then an object is an actual car created
using that blueprint.

17. Explain access specifier.


An access specifier, also known as an access modifier, is a keyword
in programming languages like VB.NET that specifies the accessibility of
types and their members (fields, properties, methods, and events) from
other parts of the program. Access specifiers control the level of visibility
and the extent to which a type or member can be accessed or modified
by other code within the same program.

18. Explain Constructor & Destructor.


A constructor is a special method that is automatically called when
an object of a class is created. Its primary purpose is to initialize the
newly created object and set its initial state.

 A destructor, also known as a finalizer, is a special method used to


clean up resources or perform finalization tasks when an object is no
longer needed or about to be destroyed.
 In VB.NET, destructors are declared using the Protected Overrides Sub
Finalize() syntax.

19. Explain Overloading & Overriding.


 Overloading refers to the ability to define multiple methods
or functions with the same name but different parameter lists within the
same class or in the same scope.
 In VB.NET, methods can be overloaded based on the number, type, and
order of parameters. Overloaded methods must have unique signatures,
which means they differ either in the number or type of parameters.
 Overloading allows you to provide multiple versions of a method with
varying behaviors or functionality, making it easier to work with objects
of the same class in different contexts.

 Overriding refers to the ability to provide a new implementation


for a method in a derived class that already exists in its base class.
 In VB.NET, methods can be overridden in a derived class using the
Overrides keyword. The overridden method in the derived class must
have the same signature (name, return type, and parameters) as the
base class method.
 Overriding allows you to customize or extend the behavior of inherited
methods in derived classes, providing flexibility and polymorphic
behavior.

20. Explain Exception Handling & Keywords.


Exception handling is a mechanism used in programming languages to
deal with errors and unexpected situations that can occur during the execution
of a program. It allows developers to gracefully handle errors and recover from
them, preventing the program from crashing or behaving unpredictably.
1. Keywords:
 Try: Begins a block of code that may cause an exception.
 Catch: Specifies the handling of exceptions that occur within the
try block.
 Finally: Specifies a block of code that always executes, regardless
of whether an exception occurs or not.
 Throw: Throws an exception explicitly within your code.
 Exception: Represents the base class for all exceptions in the .NET
Framework.
 InnerException: Gets the Exception instance that caused the
current exception.
 End Try: Ends a try-catch block.

21. Explain components of Ado.Net.


ADO.NET (ActiveX Data Objects for .NET) is a data access
technology in the .NET Framework used to interact with data sources, such
as databases, XML files, and web services. It provides a set of classes and
components for performing various data access operations, including
querying, updating, and manipulating data.

1. Data Providers:
 Data providers are components that facilitate communication
between a .NET application and a data source. ADO.NET supports
multiple data providers, each optimized for a specific data source.
 The two primary data providers in ADO.NET are:
 SQL Server Data Provider (System.Data.SqlClient): Used for
connecting to Microsoft SQL Server databases.
 OLE DB Data Provider (System.Data.OleDb): Provides
access to a wide range of data sources using the OLE DB
protocol.
2. Connection:

The Connection object represents a connection to a data source. It provides


methods for establishing, opening, closing, and managing connections to the
database.
3. Command:
 The Command object represents a SQL command or stored procedure to
be executed against the database. It encapsulates the SQL statement and
provides methods for executing commands and retrieving results.
4. DataReader:

The DataReader object provides a forward-only, read-only stream of data from


a data source. It is used to efficiently retrieve and read data from a database
query result.
5. DataAdapter:
 The DataAdapter object acts as a bridge between a dataset and a data
source. It retrieves data from the database into a dataset and updates
changes made to the dataset back to the database.
DataSet:
 The DataSet object is an in-memory cache of data retrieved from a
database. It represents a disconnected set of data tables, relationships,
and constraints.

22. What are data provider.


Data providers in ADO.NET are components responsible for facilitating
communication between a .NET application and a data source. They act as
intermediaries that enable the application to interact with different types of
data stores, such as databases, XML files, and web services. ADO.NET supports
multiple data providers, each optimized for a specific type of data source.

23. What is connection string ?


A connection string is a string that contains information required to
establish a connection to a data source, such as a database. It typically includes
details such as the server name, database name, authentication credentials,
and other connection parameters.

You might also like