Explore topic-wise InterviewSolutions in Current Affairs.

This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.

1.

Can I Write My Own .net Host?

Answer»

Yes. For an example of how to do this, take a LOOK at the source for the dm.NET moniker DEVELOPED by Jason Whittington and Don Box. There is ALSO a code SAMPLE in the .NET SDK called CorHost.

Yes. For an example of how to do this, take a look at the source for the dm.net moniker developed by Jason Whittington and Don Box. There is also a code sample in the .NET SDK called CorHost.

2.

How Can I Develop An Application That Automatically Updates Itself From The Web?

Answer»

For .NET 1.x, USE the UPDATER APPLICATION BLOCK. For .NET 2.x, use ClickOnce.

For .NET 1.x, use the Updater Application Block. For .NET 2.x, use ClickOnce.

3.

What Is The Difference Between A Private Assembly And A Shared Assembly?

Answer»

The terms 'private' and 'shared' refer to how an assembly is deployed, not any intrinsic attributes of the assembly.

A private assembly is normally used by a single application, and is STORED in the application's directory, or a sub-directory BENEATH. A shared assembly is intended to be used by multiple APPLICATIONS, and is normally stored in the global assembly cache (GAC), which is a central repository for ASSEMBLIES. (A shared assembly can also be stored outside the GAC, in which case each application must be pointed to its location via a codebase entry in the application's CONFIGURATION file.) The main advantage of deploying assemblies to the GAC is that the GAC can support multiple versions of the same assembly side-by-side.

Assemblies deployed to the GAC must be strong-named. Outside the GAC, strong-naming is optional.

The terms 'private' and 'shared' refer to how an assembly is deployed, not any intrinsic attributes of the assembly.

A private assembly is normally used by a single application, and is stored in the application's directory, or a sub-directory beneath. A shared assembly is intended to be used by multiple applications, and is normally stored in the global assembly cache (GAC), which is a central repository for assemblies. (A shared assembly can also be stored outside the GAC, in which case each application must be pointed to its location via a codebase entry in the application's configuration file.) The main advantage of deploying assemblies to the GAC is that the GAC can support multiple versions of the same assembly side-by-side.

Assemblies deployed to the GAC must be strong-named. Outside the GAC, strong-naming is optional.

4.

What Is The Cli? Is It The Same As The Clr?

Answer»

The CLI (COMMON Language Infrastructure) is the definiton of the fundamentals of the .NET framework - the Common Type System (CTS), metadata, the Virtual Execution Environment (VES) and its use of intermediate language (IL), and the SUPPORT of multiple programming languages via the Common Language Specification (CLS). The CLI is documented through ECMA - 

The CLR (Common Language Runtime) is Microsoft's primary implementation of the CLI. Microsoft also have a shared source implementation known as ROTOR, for educational purposes, as well as the .NET COMPACT Framework for mobile devices. Non-Microsoft CLI IMPLEMENTATIONS includeMono and DotGNU Portable.NET.

The CLI (Common Language Infrastructure) is the definiton of the fundamentals of the .NET framework - the Common Type System (CTS), metadata, the Virtual Execution Environment (VES) and its use of intermediate language (IL), and the support of multiple programming languages via the Common Language Specification (CLS). The CLI is documented through ECMA - 

The CLR (Common Language Runtime) is Microsoft's primary implementation of the CLI. Microsoft also have a shared source implementation known as ROTOR, for educational purposes, as well as the .NET Compact Framework for mobile devices. Non-Microsoft CLI implementations includeMono and DotGNU Portable.NET.

5.

Why Did They Call It .net?

Answer»

I don't KNOW what they were thinking. They certainly weren't thinking of people USING SEARCH TOOLS. It's meaningless marketing NONSENSE.

I don't know what they were thinking. They certainly weren't thinking of people using search tools. It's meaningless marketing nonsense.

6.

What Tools Can I Use To Develop .net Applications?

Answer»

There are a number of tools, described here in ascending ORDER of cost:

•The .NET Framework SDK is free and includes command-line compilers for C++, C#, and VB.NET and various other utilities to aid development.
•SharpDevelop is a free IDE for C# and VB.NET.
•Microsoft Visual Studio Express editions are cut-down versions of Visual Studio, for HOBBYIST or novice developers.There are different versions for C#, VB, web development etc. Originally the plan was to CHARGE $49, but MS has decided to offer them as free downloads instead, at least until November 2006.
•Microsoft Visual Studio Standard 2005 is around $300, or $200 for the upgrade.
•Microsoft VIsual Studio Professional 2005 is around $800, or $550 for the upgrade
•At the top end of the price range are the Microsoft Visual Studio Team Edition for Software Developers 2005 with MSDN Premium and Team Suite editions.

You can see the differences between the various Visual Studio versions here.

There are a number of tools, described here in ascending order of cost:

•The .NET Framework SDK is free and includes command-line compilers for C++, C#, and VB.NET and various other utilities to aid development.
•SharpDevelop is a free IDE for C# and VB.NET.
•Microsoft Visual Studio Express editions are cut-down versions of Visual Studio, for hobbyist or novice developers.There are different versions for C#, VB, web development etc. Originally the plan was to charge $49, but MS has decided to offer them as free downloads instead, at least until November 2006.
•Microsoft Visual Studio Standard 2005 is around $300, or $200 for the upgrade.
•Microsoft VIsual Studio Professional 2005 is around $800, or $550 for the upgrade
•At the top end of the price range are the Microsoft Visual Studio Team Edition for Software Developers 2005 with MSDN Premium and Team Suite editions.

You can see the differences between the various Visual Studio versions here.

7.

What Operating Systems Does The .net Framework Run On?

Answer»

The runtime supports Windows SERVER 2003, Windows XP, Windows 2000, NT4 SP6a and Windows ME/98. Windows 95 is not supported. Some parts of the framework do not work on all platforms - for example, ASP.NET is only supported on XP and Windows 2000/2003. Windows 98/ME cannot be used for development

IIS is not supported on Windows XP Home EDITION, and so cannot be used to host ASP.NET. However, the ASP.NET Web Matrix web server does run on XP Home.
The .NET COMPACT Framework is a version of the .NET Framework for mobile devices, running Windows CE or Windows Mobile. The Mono project has a version of the .NET Framework that RUNS on LINUX.

The runtime supports Windows Server 2003, Windows XP, Windows 2000, NT4 SP6a and Windows ME/98. Windows 95 is not supported. Some parts of the framework do not work on all platforms - for example, ASP.NET is only supported on XP and Windows 2000/2003. Windows 98/ME cannot be used for development

IIS is not supported on Windows XP Home Edition, and so cannot be used to host ASP.NET. However, the ASP.NET Web Matrix web server does run on XP Home.
The .NET Compact Framework is a version of the .NET Framework for mobile devices, running Windows CE or Windows Mobile. The Mono project has a version of the .NET Framework that runs on Linux.

8.

What Versions Of .net Are There?

Answer»
  • The final versions of the 1.0 SDK and runtime were made publicly available around &6pm PST on15-Jan-2002. At the same time, the final version of Visual Studio.NET was made available to MSDN subscribers.
  • .NET 1.1 was released in APRIL 2003, and was mostly bug fixes for 1.0.
  • .NET 2.0 was released to MSDN subscribers in late October 2005, and was OFFICIALLY launched in early November

9.

Who Benefits From Ajax?

Answer»

AJAX is employed to improve the user’s experience. A request is made for the initial page rendering. After that, ASYNCHRONOUS requests to the server are made. An asynchronous request is a background request to send or receive data in an ENTIRELY nonvisual MANNER.

AJAX is employed to improve the user’s experience. A request is made for the initial page rendering. After that, asynchronous requests to the server are made. An asynchronous request is a background request to send or receive data in an entirely nonvisual manner.

10.

.net Debug & Trace

Answer»

Here you can learn about break MODE, OPTIONS to STEP through code in .Net, Debug Vs Trace in .Net, trace class, listeners COLLECTION of Trace and Debug OBJECTS and Trace Switches.

Here you can learn about break mode, options to step through code in .Net, Debug Vs Trace in .Net, trace class, listeners collection of Trace and Debug objects and Trace Switches.

11.

.net Assembly

Answer»

This article explains .Net assembly, private and SHARED assembly, satellite assemblies, resource-only assembly, RESOURCEMANAGER class, STRONG NAME, global assembly CACHE.

This article explains .Net assembly, private and shared assembly, satellite assemblies, resource-only assembly, ResourceManager class, strong name, global assembly cache.

12.

.net Code Security

Answer»

This INCLUDES EXPLANATION of code security, PRINCIPAL object, declarative and imperative security, role-based security, code access security and code GROUP.

This includes explanation of code security, Principal object, declarative and imperative security, role-based security, code access security and code group.

13.

Asp.net 2.0 Themes

Answer»

One of the neat features of ASP.NET 2.0 is themes, which enable you to DEFINE the appearance of a set of controls once and APPLY the appearance to your ENTIRE web APPLICATION.

One of the neat features of ASP.NET 2.0 is themes, which enable you to define the appearance of a set of controls once and apply the appearance to your entire web application.

14.

What Basic Steps Are Needed To Display A Simple Report In Crystal?

Answer»

CRYSTAL REPORTS offer a REPORT DESIGNER. First, select specific rows and COLUMNS from a table. Using the designer, the data on the report can be rearranged and formatted.

Crystal reports offer a report designer. First, select specific rows and columns from a table. Using the designer, the data on the report can be rearranged and formatted.

15.

What Are The Various Components In Crystal Reports?

Answer»

When .NET application uses CRYSTAL reports, the FOLLOWING components are REQUIRED: Report files: .rpt or report files NEEDS to be distributed which can either be compiled into the application (Embedded) or INDEPENDENTLY (non embedded) from the application.

When .NET application uses crystal reports, the following components are required: Report files: .rpt or report files needs to be distributed which can either be compiled into the application (Embedded) or independently (non embedded) from the application.

16.

How Do We Access Crystal Reports In .net?

Answer»

When CRYSTAL REPORTS are integrated with .NET, data can be ACCESSED using ODBC drivers, ADO drivers, database files like EXCEL, xml etc

When crystal reports are integrated with .NET, data can be accessed using ODBC drivers, ADO drivers, database files like excel, xml etc

17.

.net Framework

Answer»

This includes INTRODUCTION of .NET FRAMEWORK, .Net framework architecture, role of assembly and GAC.

This includes introduction of .Net framework, .Net framework architecture, role of assembly and GAC.

18.

Explain The Concepts Of Cts And Cls(common Language Specification).

Answer»

CTS
When different LANGUAGES are integrated and want to communicate, it is certain that the languages have their own data TYPES and different declaration styles. CTS define how these different variables are declared and used in run TIME. E.g. VB offers an INTEGER data type while C++ offers long data type. Using CTS, these data types are converted to System32 which itself a data type of CLS.

CLS
Any language(s) that intend to use the Common Language Infrastructure needs to communicate with other CLS-Compliant language. This communication is based on set of rules laid by CLS. These rules define a subset of CTS.

CTS
When different languages are integrated and want to communicate, it is certain that the languages have their own data types and different declaration styles. CTS define how these different variables are declared and used in run time. E.g. VB offers an Integer data type while C++ offers long data type. Using CTS, these data types are converted to System32 which itself a data type of CLS.

CLS
Any language(s) that intend to use the Common Language Infrastructure needs to communicate with other CLS-Compliant language. This communication is based on set of rules laid by CLS. These rules define a subset of CTS.

19.

What Is A Clr (common Language Runtime)?

Answer»

Common Language Runtime - It is the implementation of CLI. The core runtime engine in the Microsoft .NET Framework for executing applications. The common language runtime supplies managed code with services such as cross-language integration, code access security, object LIFETIME MANAGEMENT, resouce management, type safety, pre-emptive threading, metadata services (type reflection), and debugging and profiling support. The ASP.NET Framework and Internet Explorer are examples of hosting CLR.

The CLR is a multi-language execution environment. There are currently over 15 compilers being built by Microsoft and other companies that produce code that will execute in the CLR.

The CLR is DESCRIBED as the "execution engine" of .NET. It's this CLR that manages the execution of programs. It provides the environment within which the programs RUN. The software version of .NET is actually the CLR version.

When the .NET program is compiled, the output of the compiler is not an executable file but a file that contains a special type of code called the Microsoft Intermediate Language (MSIL, now called CIL, Common Intermediate Language). This MSIL defines a set of portable instructions that are independent of any specific CPU. It's the job of the CLR to translate this Intermediate code into a executable code when the program is executed making the program to run in any environment for which the CLR is implemented. And that's how the .NET Framework achieves Portability. This MSIL is turned into executable code using a JIT (Just In Time) complier. The process goes like this, when .NET programs are executed, the CLR activates the JIT complier. The JIT complier CONVERTS MSIL into native code on a demand basis as each part of the program is needed. Thus the program executes as a native code even though it is compiled into MSIL making the program to run as fast as it would if it is compiled to native code but achieves the portability benefits of MSIL.

Common Language Runtime - It is the implementation of CLI. The core runtime engine in the Microsoft .NET Framework for executing applications. The common language runtime supplies managed code with services such as cross-language integration, code access security, object lifetime management, resouce management, type safety, pre-emptive threading, metadata services (type reflection), and debugging and profiling support. The ASP.NET Framework and Internet Explorer are examples of hosting CLR.

The CLR is a multi-language execution environment. There are currently over 15 compilers being built by Microsoft and other companies that produce code that will execute in the CLR.

The CLR is described as the "execution engine" of .NET. It's this CLR that manages the execution of programs. It provides the environment within which the programs run. The software version of .NET is actually the CLR version.

When the .NET program is compiled, the output of the compiler is not an executable file but a file that contains a special type of code called the Microsoft Intermediate Language (MSIL, now called CIL, Common Intermediate Language). This MSIL defines a set of portable instructions that are independent of any specific CPU. It's the job of the CLR to translate this Intermediate code into a executable code when the program is executed making the program to run in any environment for which the CLR is implemented. And that's how the .NET Framework achieves Portability. This MSIL is turned into executable code using a JIT (Just In Time) complier. The process goes like this, when .NET programs are executed, the CLR activates the JIT complier. The JIT complier converts MSIL into native code on a demand basis as each part of the program is needed. Thus the program executes as a native code even though it is compiled into MSIL making the program to run as fast as it would if it is compiled to native code but achieves the portability benefits of MSIL.

20.

Steps For Creating Clr Trigger?

Answer»

Follow these steps to create a CLR trigger of DML (after) type to perform an insert action:
• Create a .NET class of TRIGGERING action
• Make an assembly (.DLL) from that Class
• Enable CLR environment in that database.
• Register the assembly in SQL Server
• Create CLR Trigger USING that assembly

Follow these steps to create a CLR trigger of DML (after) type to perform an insert action:
• Create a .NET class of triggering action
• Make an assembly (.DLL) from that Class
• Enable CLR environment in that database.
• Register the assembly in SQL Server
• Create CLR Trigger using that assembly

21.

Clr Triggers?

Answer»

A CLR trigger could be a Date Definition or Date Manipulation LANGUAGE trigger or could be an AFTER or INSTEAD OF trigger.

Methods WRITTEN in managed codes that are members of an assembly need to be executed provided the assembly is deployed in SQL 2005 using the CREATE assembly statement.

The Microsoft.SqlServer.Server Namespace contains the REQUIRED classes and enumerations for this objective.

A CLR trigger could be a Date Definition or Date Manipulation Language trigger or could be an AFTER or INSTEAD OF trigger.

Methods written in managed codes that are members of an assembly need to be executed provided the assembly is deployed in SQL 2005 using the CREATE assembly statement.

The Microsoft.SqlServer.Server Namespace contains the required classes and enumerations for this objective.

22.

Overview Of Clr Integration.

Answer»

The CLR (Common Language Runtime) integration is hosted in the MICROSOFT SQL Server 2005. With CLR integration, stored procedures, triggers, user- defined functions, user-defined types, and user-defined aggregates in managed code, etc can be written.

As managed code compiles to native code before executing, significant PERFORMANCE can be achieved.

The SQL Server ACTS as an operating system for the CLR when it is hosted inside SQL Server.

Following are the steps to build a CLR stored PROCEDURE in SQL Server 2005

  • Enable CLR integration in SQL Server 2005
  • Create a CLR stored procedure Assembly
  • Deploy the Assembly in SQL Server 2005
  • Create and execute the CLR stored procedure in SQL Server 2005

The CLR (Common Language Runtime) integration is hosted in the Microsoft SQL Server 2005. With CLR integration, stored procedures, triggers, user- defined functions, user-defined types, and user-defined aggregates in managed code, etc can be written.

As managed code compiles to native code before executing, significant performance can be achieved.

The SQL Server acts as an operating system for the CLR when it is hosted inside SQL Server.

Following are the steps to build a CLR stored procedure in SQL Server 2005

23.

Describe The Parts Of Assembly.

Answer»

An assembly is a partially compiled CODE library. In .NET, an assembly is a portable executable and can be an EXE (process assembly) or a DLL (library assembly). An assembly can consist of ONE or more files or modules in various languages. It is used in DEPLOYMENT, versioning and SECURITY.

An assembly is a partially compiled code library. In .NET, an assembly is a portable executable and can be an EXE (process assembly) or a DLL (library assembly). An assembly can consist of one or more files or modules in various languages. It is used in deployment, versioning and security.

24.

Describe How A .net Application Is Compiled And Executed.

Answer»

From the source code, the compiler generates MICROSOFT Intermediate Language (MSIL) which is further used for the creation of an EXE or DLL. The CLR PROCESSES these at runtime. Thus, compiling is the process of generating this MSIL.

The way you do it in .Net is as follows:
Right-click and select Build / Ctrl-Shift-B / Build menu, Build command
F5 - compile and run the application.
Ctrl+F5 - compile and run the application without debugging.

Compilation can be done with Debug or RELEASE configuration. The DIFFERENCE between these two is that in the debug configuration, only an assembly is generated without optimization. However, in release complete optimization is PERFORMED without debug symbols.

From the source code, the compiler generates Microsoft Intermediate Language (MSIL) which is further used for the creation of an EXE or DLL. The CLR processes these at runtime. Thus, compiling is the process of generating this MSIL.

The way you do it in .Net is as follows:
Right-click and select Build / Ctrl-Shift-B / Build menu, Build command
F5 - compile and run the application.
Ctrl+F5 - compile and run the application without debugging.

Compilation can be done with Debug or Release configuration. The difference between these two is that in the debug configuration, only an assembly is generated without optimization. However, in release complete optimization is performed without debug symbols.

25.

Explain Clr In Brief.

Answer»

CLR stands for Common Language Runtime.
The CLR is a development platform. It PROVIDES a runtime, defines functionality in some libraries, and supports a set of programming languages. The CLR provides a runtime so that the softwares can utilize its services. The CLR Base Class LIBRARY allows interaction with the runtime. The CLR supports various programming languages, several STANDARDS and is itself been submitted as an open STANDARD.

CLR stands for Common Language Runtime.
The CLR is a development platform. It provides a runtime, defines functionality in some libraries, and supports a set of programming languages. The CLR provides a runtime so that the softwares can utilize its services. The CLR Base Class Library allows interaction with the runtime. The CLR supports various programming languages, several standards and is itself been submitted as an open standard.

26.

What Is Native Image Generator (ngen.exe)?

Answer»

Ngen.exe helps in IMPROVING PERFORMANCE of managed applications by creating native IMAGES and STORING them on the.

Ngen.exe helps in improving performance of managed applications by creating native images and storing them on the.

27.

Explain Boxing And Unboxing In .net.

Answer»

Boxing PERMITS any value type to be IMPLICITLY CONVERTED to type object or to any interface type Implemented by value

Boxing permits any value type to be implicitly converted to type object or to any interface type Implemented by value

28.

What Is Garbage Collection? How To Force Garbage Collector To Run?

Answer»

Garbage collection helps in RELEASING MEMORY occupied by OBJECTS. CLR automatically releases these unused objects.

Garbage collection helps in releasing memory occupied by objects. CLR automatically releases these unused objects.

29.

What Is Manifest In .net?

Answer»

Manifest is nothing but a simple text file USED to store metadata information of different .NET ASSEMBLIES. Manifest file can be saved as a stand alone file of type PE. It can also be stored as an exe or as a DLL file CONTAINING intermediate language code.

Manifest is nothing but a simple text file used to store metadata information of different .NET assemblies. Manifest file can be saved as a stand alone file of type PE. It can also be stored as an exe or as a dll file containing intermediate language code.

30.

Aspect-oriented Programming?

Answer»

ASPECT Oriented Programming or AOP is an interesting concept that can be applied to MANY of the programming problems we solve everyday. In our VISUAL Studio team system code we have a lot of web-services and remoting code that essentially does the following

public void MyMethod(int parameter) { Trace.EnteredMethod("MyMethod", parameter); SecurityCheck(); // Bunch of processing Trace.ExitMethod("MyMethod"); }

Aspect Oriented Programming or AOP is an interesting concept that can be applied to many of the programming problems we solve everyday. In our Visual Studio team system code we have a lot of web-services and remoting code that essentially does the following

31.

Security With Aop?

Answer»

Security is one of the most important elements of an application. The word "security" covers two concepts: Authentication is the verifi cation's process of a principal's IDENTITY; a principal is typically a user. A principal in order to be authenticated provides a credential that is the PASSWORD. Authorization, on the other HAND, is the process of granting authorities, which are USUALLY roles, to an authenticated user.

Security is one of the most important elements of an application. The word "security" covers two concepts: Authentication is the verifi cation's process of a principal's identity; a principal is typically a user. A principal in order to be authenticated provides a credential that is the password. Authorization, on the other hand, is the process of granting authorities, which are usually roles, to an authenticated user.

32.

Transparent Caching With Aop ?

Answer»

To get BETTER results in terms of speed and resources used, it's suggested to use a cache. We can store in it the results corresponding to the methods INVOCATIONS as KEY-value PAIRS: method and arguments as key and RETURN object as value.

To get better results in terms of speed and resources used, it's suggested to use a cache. We can store in it the results corresponding to the methods invocations as key-value pairs: method and arguments as key and return object as value.

33.

Concurrency With Aop?

Answer»

Concurrency is the SYSTEM's ability to act with several requests simultaneously, such a way that threads don't corrupt the state of OBJECTS when they GAIN access at the same time.

Concurrency is the system's ability to act with several requests simultaneously, such a way that threads don't corrupt the state of objects when they gain access at the same time.

34.

What Are The Concepts Of Dispose Method?

Answer»

Dispose method belongs to IDisposable interface. It is used to free unmanaged resources like files, NETWORK CONNECTION ETC.

Dispose method belongs to IDisposable interface. It is used to free unmanaged resources like files, network connection etc.

35.

What Is Finalize Method In .net?

Answer»

Object.FINALIZE method in .NET is typically used to clean and release unmanaged resources LIKE OS files, window etc. Even though GARBAGE collector in .NET has the ability to determine the life TIME of such objects, however, with no knowledge how to clean them. The Finalize method allows an object to clean up such unmanaged resources when the garbage collector wishes to reclaim the memory. However, Finalize method should be avoided until necessary as it affects the performance because reclaiming the memory used by objects with Finalize methods requires at least two garbage collections.

Object.Finalize method in .NET is typically used to clean and release unmanaged resources like OS files, window etc. Even though Garbage collector in .NET has the ability to determine the life time of such objects, however, with no knowledge how to clean them. The Finalize method allows an object to clean up such unmanaged resources when the garbage collector wishes to reclaim the memory. However, Finalize method should be avoided until necessary as it affects the performance because reclaiming the memory used by objects with Finalize methods requires at least two garbage collections.

36.

What Is Operator Overloading In .net?

Answer»

OPERATOR overloading is the most evident EXAMPLE of Polymorphism. In operator overloading, an operator is ‘overloaded’ or MADE to perform ADDITIONAL functions in addition to what it actually does. For e.g. we can overload the “+” operator to add two complex numbers or two imaginary numbers.

X= a + b //+ is overloaded to add two integers, float ETC
Few operators like :: cannot be overloaded.

Operator overloading is the most evident example of Polymorphism. In operator overloading, an operator is ‘overloaded’ or made to perform additional functions in addition to what it actually does. For e.g. we can overload the “+” operator to add two complex numbers or two imaginary numbers.

X= a + b //+ is overloaded to add two integers, float etc
Few operators like :: cannot be overloaded.

37.

Features Of Static/shared Classes.

Answer»

Static classes are used when any change made to an OBJECT should not AFFECT the data and functions of the class. They can be used to create data and functions without the need of an INSTANCE.

Following are features of Static/Shared classes:-

  • They can not be instantiated. By DEFAULT a object is created on the first method call to that object.
  • Static/Shared classes can not be INHERITED.
  • Static/Shared classes can have only static members.
  • Static/Shared classes can have only static constructor.

Static classes are used when any change made to an object should not affect the data and functions of the class. They can be used to create data and functions without the need of an instance.

Following are features of Static/Shared classes:-

38.

Similarities And Difference Between Class And Structure In .net

Answer»

Similarities:

  • Both Class and Structures can have methods, variables and objects.
  • Both can have constructor.
  • Both are user defined types.

DIFFERENCES:

  • STRUCTURE being value type, the variables cannot be assigned to NULL. On the other hand, CLASSES being REFERENCE type, a class variable can be assigned to NULL.
  • Structure is allocated on a stack when instantiated, while Class is allocated on a heap.
  • When a method is passed to a class, PASS by reference is used. Pass by value is used for struts.
  • A class can have a destructor.

Similarities:

Differences:

39.

Difference Between Abstract Classes And Interfaces

Answer»

ABSTRACT classes:

  • An abstract class can implement methods.
  • An abstract class can inherit from a class and one or more INTERFACES.
  • An abstract class can contain fields.
  • An abstract class can implement a property.
  • An abstract class can contain CONSTRUCTORS or destructors.
  • An abstract class cannot be inherited from by structures.
  • An abstract class cannot support multiple INHERITANCE.

interfaces:

  • An Interface cannot implement methods.
  • An Interface can only inherit from ANOTHER Interface.
  • An Interface cannot contain fields.
  • An Interface can contain property definitions.
  • An Interface cannot contain constructors or destructors.
  • An Interface can be inherited from by structures.
  • An Interface can support multiple inheritance.

Abstract classes:

interfaces:

40.

Explain The Features Of An Abstract Class In Net.

Answer»

An Abstract class is only used for inheritance. This means it acts as a BASE class for its derived classes. One cannot use it to CREATE OBJECTS. When a class is declared as “Abstract”, it can only be INHERITED and not instantiated. MustInherit Keyword can be used to DECLARE a class as abstract. Abstract classes can also specify abstract members.

An Abstract class is only used for inheritance. This means it acts as a base class for its derived classes. One cannot use it to create objects. When a class is declared as “Abstract”, it can only be inherited and not instantiated. MustInherit Keyword can be used to declare a class as abstract. Abstract classes can also specify abstract members.

41.

What Is Difference Between Association, Aggregation And Inheritance Relationships?

Answer»

Association:
An association describes a group of links with common structure and common semantics.

Example:
A person works for a company. It is often APPEAR verb in the problem statement. It is implemented as a pointer or reference to an object

Aggregation:
An aggregation is the "a part of" relationship in which objects represents the components in same assembly. Aggregation may be the special FORM of Association.

Example :
A PARAGRAPH consists of many sentences. Here Paragraph contains sentences.

Inheritance:
Inheritance is a relationship between a class and one or more redefined version of it. It is sometimes CALLED "is a relationship.

Association:
An association describes a group of links with common structure and common semantics.

Example:
A person works for a company. It is often appear verb in the problem statement. It is implemented as a pointer or reference to an object

Aggregation:
An aggregation is the "a part of" relationship in which objects represents the components in same assembly. Aggregation may be the special form of Association.

Example :
A Paragraph consists of many sentences. Here Paragraph contains sentences.

Inheritance:
Inheritance is a relationship between a class and one or more redefined version of it. It is sometimes called "is a relationship.

42.

Explain Different Properties Of Object Oriented Systems.

Answer»

An object oriented system revolves around a Class and objects. A class is used to describe characteristics of any entity of the real world. An object is a pattern of the class. An actual object created at runtime is called as an instance. A class, apart from characteristics has some functions to perform called as methods. For.e.g A class named “Food” has attributes like ‘price’, ‘quantity’. “Food” class has methods like Serve_food(), bill_food().

Objects in Object Oriented Systems interact through messages.

  • Inheritance:- The main class or the root class is called as a Base Class. Any class which is expected to have ALL PROPERTIES of the base class along with its own is called as a DERIVED class. The process of deriving such a class is Derived class. For the “Food” class, a Derived class can be “Class Chinesefood”.
  • Abstraction:- Abstraction is creating models or classes of some broad concept. Abstraction can be achieved through Inheritance or even Composition.
  • Encapsulation:- Encapsulation is a collection of functions of a class and object. The “Food” class is an encapsulated form. It is achieved by specifying which class can use which members (PRIVATE, public, protected) of an object.
  • Polymorphism:- Polymorphism means existing in different FORMS. Inheritance is an EXAMPLE of Polymorphism. A base class exists in different forms as derived classes. Operator overloading is an example of Polymorphism in which an operator can be applied in different situations.

An object oriented system revolves around a Class and objects. A class is used to describe characteristics of any entity of the real world. An object is a pattern of the class. An actual object created at runtime is called as an instance. A class, apart from characteristics has some functions to perform called as methods. For.e.g A class named “Food” has attributes like ‘price’, ‘quantity’. “Food” class has methods like Serve_food(), bill_food().

Objects in Object Oriented Systems interact through messages.

43.

What Is The Relation Between Classes And Objects?

Answer»

Class is a group of items, attributes of some entity. OBJECT is any specific ITEM that may or may not be a PART of the class.When a class is CREATED, objects for those classes are created.

Class is a group of items, attributes of some entity. Object is any specific item that may or may not be a part of the class.When a class is created, objects for those classes are created.

44.

What Are The Steps To Create A Webservice And Consume It?

Answer»

In Visual STUDIO you can create a new project using "Asp.NET Web Service" template or just create asmx-file using any text editor. After webservice is implemented, you NEED EITHER add a webreference to it in Visual Studio, or to create a PROXY for the client manually using wsdl.exe utility and build a client program using created proxy class, so that using it client can consume the webservice.

In Visual Studio you can create a new project using "Asp.NET Web Service" template or just create asmx-file using any text editor. After webservice is implemented, you need either add a webreference to it in Visual Studio, or to create a proxy for the client manually using wsdl.exe utility and build a client program using created proxy class, so that using it client can consume the webservice.

45.

Which Attribute Is Used In Order That The Method Can Be Used As Webservice?

Answer»

WebMethod ATTRIBUTE has to be SPECIFIED in ORDER that the method and property can be treated as WEBSERVICE.

WebMethod attribute has to be specified in order that the method and property can be treated as WebService.

46.

What Is File Extension Of Webservices?

Answer»

.ASMX is EXTENSION for WEBSERVICES.

.ASMX is extension for Webservices.

47.

What The Different Phase/steps Of Acquiring A Proxy Object In Webservice?

Answer»

Following are the different steps needed to get a PROXY object of a WEBSERVICE at the client side:
-Client communicates to UDDI node for webservice either through browser or UDDI’s public web service.
-UDDI node responds with a list of webservices.
-EVERY service listed by webservice has a URI pointing to DISCO or WSDL document.
-After parsing the DISCO document, we follow the URI for the WSDL document related to the webservice which we need.
-Client then parses the WSDL document and builds a proxy object which can communicate with Webservice.

Following are the different steps needed to get a proxy object of a webservice at the client side:
-Client communicates to UDDI node for webservice either through browser or UDDI’s public web service.
-UDDI node responds with a list of webservices.
-Every service listed by webservice has a URI pointing to DISCO or WSDL document.
-After parsing the DISCO document, we follow the URI for the WSDL document related to the webservice which we need.
-Client then parses the WSDL document and builds a proxy object which can communicate with Webservice.

48.

What Is Wsdl?

Answer»

Web Service DESCRIPTION Language (WSDL)is a W3C specification which defines XML GRAMMAR for describing Web Services.XML grammar DESCRIBES details such as where we can find the Web Service (its URI), what are the methods and properties that service SUPPORTS, data type support and supported PROTOCOLS.

Clients can consume this WSDL and build proxy objects that clients use to communicate with the Web Services.

Web Service Description Language (WSDL)is a W3C specification which defines XML grammar for describing Web Services.XML grammar describes details such as where we can find the Web Service (its URI), what are the methods and properties that service supports, data type support and supported protocols.

Clients can consume this WSDL and build proxy objects that clients use to communicate with the Web Services.

49.

What Is Disco?

Answer»

DISCO is the abbreviated form of Discovery. It is basically used to club or GROUP common SERVICES together on a SERVER and provides links to the SCHEMA documents of the services it describes may require.

DISCO is the abbreviated form of Discovery. It is basically used to club or group common services together on a server and provides links to the schema documents of the services it describes may require.

50.

What Is Uddi?

Answer»

Full FORM of UDDI is UNIVERSAL DESCRIPTION, Discovery and Integration. It is a directory that can be used to publish and discover public Web SERVICES.

Full form of UDDI is Universal Description, Discovery and Integration. It is a directory that can be used to publish and discover public Web Services.