.NET Framework Interview Questions and Answers (547) - Page 5

For SOAP (Simple Object Access Protocol) message formatting what is the purpose of Encoded value?

NOTE: This is objective type question, Please click question title for correct answer.
Which method is used to serialize an object into an XML document from Xmlserializer class?

NOTE: This is objective type question, Please click question title for correct answer.
What value can be used when setting the direction of the SOAP header?

NOTE: This is objective type question, Please click question title for correct answer.
Which is a true statement for BeforeSerialize stage of an in-coming request message occurs?

NOTE: This is objective type question, Please click question title for correct answer.
What is true for namespace in .NET Framework?

NOTE: This is objective type question, Please click question title for correct answer.
What is Manifest?

NOTE: This is objective type question, Please click question title for correct answer.
whats the similarilty & difference between .dll extension and .exe extension files?

A standard exe application is one that is created using Standard EXE project. It is the most widely used Project type using VB6. Standard EXE application is normally the most widely used among the available Project types in Visual Basic. Stand-alone programs have an .EXE file extension.

Usage A standard EXE application is normally used when you want to develop a stand-alone application. Examples include calculators, text editors, and other similar applications.

An ActiveX EXE application is one that is created using ActiveX EXE project. ActiveX EXE are widely used in conjunction with standard EXE applications. There are three types of widely used of ActiveX projects. These are:

a. ActiveX EXE
b. ActiveX DLL
c. ActiveX Control

ActiveX EXE: Unlike a stand-alone EXE file, an ActiveX EXE file is designed to work as an OLE server, which is nothing more than a program designed to share information with another program. It has an .EXE file extension.

ActiveX DLL: ActiveX DLL files are not meant to be used by themselves. Instead, these types of files contain subprograms designed to function as building blocks when creating a stand-alone program. It has a .DLL file extension.

ActiveX Control: Unlike an ActiveX DLL or ActiveX EXE file, an ActiveX Control file usually provides both subprograms and a user interface that you can reuse in other programs. It has an .OCX file extension.

Usage
1. The ActiveX EXE/DLL is normally used when you need to build a component that is separate from the main program. The concept is based on COM model.

2. ActiveX DLL/EXE allows multiple applications to share the same code. This allows for scalability of programs, and saves time because you only need to write the code once.

3. ActiveX DLLs and ActiveX EXEs are almost same in the ways they are built and used. In either case, you build one or more classes that applications can use to do something.

4. One of the main differences between ActiveX EXE and an ActiveX DLL's is that the code is executed within the main program's address space for ActiveX DLL. This is because the code lies inside the program's address space, calling methods and execution of code is very fast.

Differences

An ActiveX Exe provides the reusability of code, by accessing it from different clients.

An ActiveX Exe is a component that can be called by another application by providing a reference to the component. But a Standard Exe application cannot be called in this way.

An ActiveX EXE's code is run in a separate process. When the main program calls an ActiveX EXE's method, the application passes required parameters into the ActiveX EXE's and calls the method. The ActiveX EXE, upon execution may return the results to the main program. This is slower than running an ActiveX DLL's method inside the main program's address space.
If I write System.exit (0); at the end of the try block, will the finally block still execute ?

No in this case the finally block will not execute because when you say System.exit (0); the control immediately goes out of the program, and thus finally never executes.
What is the difference between Master- Detail view and MVG?

Following are the main advantages:-
1) MVG Makes effective use of the space.
2) Multiple set of detail records can be viewed from a single
view
Difference between VB.NET and C#.

Difference between VB.NET and C#.
VB.NET :
-----------

1)no unsigned int
2)Loosely typed language
3)no operator overloading
4)no pointers
5)no auto XML documentation


C#.net :
-------------
1) supports unsigned int
2)strongly typed language
3)supports operator overloading
4)supports pointers
5)supports auto XML documentation
Name a feature which is common to all .NET languages?

Name a feature which is common to all .NET languages?
There is only one feature which is common to all languages and that is Garbage collection or GC. This feature is automated which relieves developers of much work. This garbage is disposed only when there is need of memory or stress for memory. GC feature halts the application for few seconds before restarting it.
Most Important Questions in Interview

Q1. Explain the differences between Server-side and Client-side code?
Ans. Server side code will execute at server (where the website is hosted) end, & all the business logic will execute at server end where as client side code will execute at client side (usually written in javascript, vbscript, jscript) at browser end.

Q2. What type of code (server or client) is found in a Code-Behind class? Ans. Server side code.

Q3. How to make sure that value is entered in an asp:Textbox control? Ans. Use a RequiredFieldValidator control.

Q4. Which property of a validation control is used to associate it with a server control on that page? Ans. ControlToValidate property.

Q5. How would you implement inheritance using VB.NET & C#? Ans. C# Derived Class : Baseclass
VB.NEt : Derived Class Inherits Baseclass

Q6. Which method is invoked on the DataAdapter control to load the generated dataset with data? Ans. Fill() method.

Q7. What method is used to explicitly kill a user's session? Ans. Session.Abandon()

Q8. What property within the asp:gridview control is changed to bind columns manually? Ans. Autogenerated columns is set to false

Q9. Which method is used to redirect the user to another page without performing a round trip to the client?
Ans. Server.Transfer method.

Q10. How do we use different versions of private assemblies in same application without re-build? Ans.Inside the Assemblyinfo.cs or Assemblyinfo.vb file, we need to specify assembly version.
assembly: AssemblyVersion
What event can you subscribe to if you want to display information from SQL Print statements?

NOTE: This is objective type question, Please click question title for correct answer.
Advantages of Crystal Reports

Advantages of Crystal Reports

Some of the major advantages of using Crystal Reports are:

1. Rapid report development since the designer interface would ease the coding work for the programmer.

2. Can extend it to complicated reports with interactive charts and enhance the understanding of the business model

3. Exposes a report object model, can interact with other controls on the ASP.NET Web form

4. Can programmatically export the reports into widely used formats like .pdf, .doc, .xls, .html and .rtf
What is the Difference between Web.config and Machine.config?

Scope:
Web.config => For particular application in IIS.
Machine.config = > For All the applications in IIS
Created:
Web.config => Created when you create an application
Machine.config => Create when you install Visual Studio
Known as:
Web.config => is known as Application Level configuration file
Machine.config => is known as Machine level configuration file
Location:
Web.config => In your application Directory
Machine.config => …\Microsoft.NET\Framework\(Version)\ CONFIG
What’s the difference between Response.Write() andResponse.Output.Write()?

Response.Output.Write() allows you to write formatted output.
From the following which datatype is not supported in RangeValidator?

NOTE: This is objective type question, Please click question title for correct answer.
What is the Global.asax used for?

The Global.asax (including the Global.asax.cs file) is used to implement application and session level events.
What does the "EnableViewState" property do? Why would I want it on or off?

It allows the page to save the users input on a form across postbacks. It saves the server-side values for a given control into ViewState, which is stored as a hidden value on the page before sending the page to the clients browser. When the page is posted back to the server the server control is recreated with the state stored in viewstate.
What is GC in NET Framework?

The .NET Framework's garbage collector manages the allocation and release of memory for your application. Each time you use the new operator to create an object, the runtime allocates memory for the object from the managed heap. As long as address space is available in the managed heap, the runtime continues to allocate space for new objects. However, memory is not infinite. Eventually the garbage collector must perform a collection in order to free some memory. The garbage collector's optimizing engine determines the best time to perform a collection, based upon the allocations being made. When the garbage collector performs a collection, it checks for objects in the managed heap that are no longer being used by the application and performs the necessary operations to reclaim their memory.
Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories