You are on page 1of 9

1. What is Application Framework?

A set of classes and‐or libraries used to implement the standard structure of an application for a
specific operating system is called as application framework.They provide structure and services
for application development. Application frameworks are extensible, modular, and reusable.

2. What is NET Framework?

Microsoft programming infrastructure for creating, deploying, and executing applications and
services that use .NET technologies. .NET Framework comprises three major components -
Common Language Runtime (CLR), Framework Base Classes and ASP.NET .

3. What are the services provided by the CLR?

Loading and execution of programs.

Memory isolation for applications.

Verification of type safety

Compilation of IL into native executable code

Providing metadata

Memory Management (automatic garbage collection)

Enforcement of Security

Interoperability with other systems.

Managing exceptions and errors

Support for tasks such as debugging and profiling.

4. What are the benefits of CLR?

Interoperability with other languages

Enhanced security

Versioning support

Debugging support

Automatic garbage collection

XML support for web‐based applications.


5. List out the components of CLR?

Common Type System

Intermediate Language (IL)

Execution Support Functions

Security

Garbage Collection

Class Loader

Memory Layout

6. Define Common Language Specification (CLS)?

CLS is a subset of the Common Type System and a set of conventions for promoting
interoperability between programming languages and the .NET Framework. CLS details
conventions that must be followed by class library authors and by programming language
designers.

7. Define Common Type System (CTS)?

CTS is the .NET Framework specification for defining, declaring, and managing types in .NET
languages for the Common Language Runtime (CLR). All .NET components must comply with
the CTS specification.

8. What is Framework Class Library (FCL)?

FCL comprises the thousands of classes constituting the foundation of the .NET Framework. FCL
services include core functionality—collections, file and network I/O, system service access,
value types, etc.—, database interaction, desktop‐based application support—Windows Forms
—, Web‐based application support—Web Forms—, Web services support, and XML support.

9. What is Just‐In‐Time (JIT)?

JIT is the process of compiling MSIL code units just when needed at runtime. The JIT compiler in
the Common Language Runtime (CLR) compiles MSIL instructions to native machine code as
a .NET application is being executed. Compilation occurs when a method is called and is not
compiled more than once during program execution; because, JIT‐compiled code is cached in
memory.

10. What is Managed code?


Code that is executed by the Common Language Runtime (CLR) is called managed code.
Managed code provides metadata to enable the CLR to handle exceptions, locate methods
encoded in assembly modules, and manage security information. Managed code can access
both managed data and unmanaged data.

11. What is unmanaged code?

It is, also called unsafe code, code that executes outside of the control of the Common
Language Runtime (CLR). Unmanaged code may perform unsafe operations such as pointer
arithmetic. Unmanaged code is used for accessing unmanaged memory, calling Windows APIs,
interfacing to COM components, and coding performance‐critical methods which avoid the
overhead of the CLR.

12. What is Managed data?

Data in memory allocated and deallocated by the Common Language Runtime (CLR). Managed
data can be accessed only by managed code.

13. What is unmanaged data?

Data allocated outside of the control of the Common Language Runtime (CLR). Unmanaged
data is accessible by both managed and unmanaged code.

14. What is serialization?

Serialization can be defined as the process of storing the state of an object instance to a storage
medium. During this process, the public and private fields of the object and the name of the
class, including the assembly containing the class, is converted to a stream of bytes, which is
then written to a data stream. When the object is subsequently deserialized, an exact clone of
the original object is created.

15. What is remoting?

Remoting provides a framework that allows objects to interact with one another across
application domains. The framework provides a number of services, including activation and
lifetime support, as well as communication channels responsible for transporting messages to
and from remote applications.

16. What is comment? List out its types?

The statements which are not included for compilation by the compiler are called as comments.
They are used to enhance readability and understanding of code. C# permits two types of
comments, namely:
Single Line Comments

Begins with a double backslash (//) symbol. Ex: //Main method begins Multi Line Comments

This starts with /* characters and terminates with */. Ex: /* Program - Testing Delegates

Date - 09.10.08 Developer - Kumaran */

17. What are keywords?

Keywords are an essential part of a language definition. They implement specific features of the
language. They are reserved, and cannot be used as identifiers except when they are prefaced
by the @ character. There are 79 keywords in C#. Ex: public, private, if, while etc..

18. What are identifiers?

Identifiers are programmer‐designed tokens. They are used for naming classes, methods,
variables, labels, namespaces, interfaces, etc. C# identifiers enforce the following rules:

They can have alphabets, digits and underscore characters. They must not begin with a digit

Upper case and lower case letters are distinct

Keywords in stand‐alone mode cannot be used as identifiers

C# permits the use of keywords as identifiers when they are prefixed with a @ character.

19. What are punctuators?

Punctuators are symbols used for grouping and separating code. They define the shape and
function of a program. Punctuators or Separators in C# include:

Parentheses ()

Braces { }

Brackets []

Semicolon ;

Colon :

Comma ,

Period .

20. What is value type?


It includes simple data types such as enum, struct, char, bool, int, float, etc. Value type variable
directly contain data since memory is allocated on stack. Operation on one variable does not
affect the other value type variable. It provides efficient access and faster execution by stack
allocation.

21. What is reference type?

It includes class types, interface types, delegate types and array types. Reference variable
stores references to objects whereas the data of objects are stored in locations represented by
references. Reference variable points to an object allocated on heap. Reference variable can
have null value. One or more reference variables can be assigned with the same reference of an
object. Hence, operation on one reference variable may affect the object referenced by the
other reference variable.

22. What is a class?

A class is essentially a description of how to construct an object that contains fields and
methods. It provides a sort of template for an object and behaves like a basic data type such as
int. Classes provide a convenient approach for packing together a group of logically related data
items and functions that work on them.

23. Write a note on encapsulation?

Encapsulation provides the ability to hide the internal details of an object from its users. The
outside user may not be able to change the state of an object directly.

However, the state of an object may be altered indirectly using what are known accessor and
mutator methods. The concept of encapsulation is also known as data hiding or information
hiding.

24. What is inheritance?

Inheritance is the concept used to build new classes using the existing class definitions.
Through inheritance a class can be modified easily. The original class is known as base or
parent class and the modified one is known as derived class or subclass or child class. The
concept of inheritance facilitates the reusuability of existing code and thus improves the
integrity of programs and productivity of programmers.

25. What is polymorphism?

Polymorphism is the ability to take more than one form. The behavior of the method depends
upon the types of data used in the operation. This is extensively used while implementing
inheritance.
26. What is the Characteristic of Inheritance?

1. A derived class extends its direct base class. It can add new members to those it
inherits.However, it cannot change or remove the definition on an inherited member.

2. Constructor and destructors are not inherited. All other members, regardless of their
declared accessibility in base class, are inherited.

All instance of a class contains a copy of all instance fields declared in the class and its base
classes.

A derived class can hide an inherited member.

A derived class can override an inherited member.

27. Define Delegate?

It is an Event handling mechanism of .NET. To raise events, a class must define one delegate per
event type. To handle events, types must implement one event handler per event type.
Delegates can reference both instance and static methods. C# uses the delegate keyword.

28. What are steps involved in using delegates in a C# program?

Delegate declaration

Delegate methods definition

Delegate instantiation

Delegate invocation

29. What is an event?

An event is a delegate type class member that is used by the object or class to provide a
notification to other objects that an event has occurred. The client object can act on an event
by adding an event handler to an event.

The type of an event declaration must be a delegate type and the delegate must be as
accessible as the event itself.

30. What is an error?

Error is a mistake that can make a program go wrong. An error may produce an incorrect
output or may terminate the execution of the program abruptly or even may cause the system
to crash. There are two types of error:
Compiler‐time errors

Run‐time errors

31. Describe about Visual basic.NET?

This is used in conjunction with Microsoft .NET platform and is a successor to visual basic sixth
version. Visual basic is used in conjunction with.NET Framework. This tool has a serious defect it
is not compatible with Microsoft visual basic sixth version. It has a huge library which assists
programmers.

32. Compare between VB.Net and C#s.

.NET Frame work includes two languages which are language to IL compilers and in this C# and
VB.NET are provided. The importance and flexibility of these as better programming languages
is still questionable. Visual basic has been updated and revised to make it object oriented
whereas C# has concepts from many languages such as Delphi, Java, etc and syntax from C and
Java.

33. What are objects in VB .NET?

A Method is a procedure built into the class. They are a series of statements that are executed
when called. Methods allow us to handle code in a simple and organized fashion. There are two
types of methods in VB .NET: those that return a value (Functions) and those that do not return
a value (Sub Procedures).

34. How are the Fields, Properties, Methods, and Events related to class?

Fields, Properties, Methods, and Events are members of the class. They can be declared as
Public, Private, Protected, Friend or Protected Friend.

Fields and Properties represent information that an object contains. Fields of a class are like
variables and they can be read or set directly. For example, if you have an object named House,
you can store the numbers of rooms in it in a field named Rooms.

Public Class

House Public Rooms as Integer

End Class

35. Write about operator Overloading?


Operator overloading is the ability for you to define procedures for a set of operators on a given
type. This allows you to write more intuitive and more readable code.

36. Define Arrays in VB.NET with example?

Arrays are using for store similar data types grouping as a single unit. We can access Array
elements by its numeric index.

Dim week(6) As String

36. Structured versus Unstructured, When to Use Which?

Structured exception handling is simply that — using a control structure containing exceptions,
isolated blocks of code, and filters to create an exception handling mechanism. This allows your
code to differentiate between different types of errors and react in accordance with
circumstances. In unstructured exception handling, an On Error statement at the beginning of
the code handles all exceptions.

37. Write about Structured exception handling?

Structured exception handling tests specific pieces of the code and, as exceptions occur, adapts
your exception-handling code to the circumstances that caused the exception. It is significantly
faster in large applications than unstructured exception handling and allows more flexible
response to errors as well as greater application reliability.

38. Example for Structured Exception Handling.

This code example is a simple Try...Catch block that first checks for ArithmeticException and
then checks for generic exceptions.

Imports System

Sub Main()

Dim x As Integer = 0

Try

Dim y As Integer = 100 / x

Catch ex As ArithmeticException

MessageBox.Show(ex.Message)

Catch ex As Exception
MsgBox(ex.Message)

End Try

End Sub 'Main

End Class 'SamplesDelegate

39. Where are the ADO .NET Classes found?

The ADO.NET classes are found in System.Data.dll, and are integrated with the XML classes
found in System.Xml.dll. When compiling code that uses the System.Data namespace, reference
both System.Data.dll and System.Xml.dll.

40. Draw the ADO.NET Architecture.

You might also like