Monday, November 16, 2009

Which debugging window allows you to see the methods called in the order they were called?

The call stack

What is the smallest unit of execution in .NET?

an Assembly.

What are the ways to deploy an assembly?

An MSI installer, a CAB archive, and XCOPY command.

What happens in memory when you Box and Unbox a value-type?

Boxing converts a value-type to a reference-type, thus storing the object on the heap.  Unboxing converts a reference-type to a value-type, thus storing the value on the stack.

When should you call the garbage collector in .NET?

As a good rule, you should not call the garbage collector.  However, you could call the garbage collector when you are done using a large object (or set of objects) to force the garbage collector to dispose of those very large objects from memory.  However, this is usually not a good practice.

What namespaces are necessary to create a localized application?

System.Globalization and System.Resources.

How is the DLL Hell problem solved in .NET?

Assembly versioning allows the application to specify not only the library it needs to run (which was available under Win32), but also the version of the assembly.

What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?

SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2, Microsoft Access and Informix.  OLE-DB.NET is a .NET layer on top of the OLE layer, so it’s not as fastest and efficient as SqlServer.NET.

Where is the output of TextWriterTraceListener redirected?

To the Console or a text file depending on the parameter passed to the constructor.

What debugging tools come with the .NET SDK?

1.   CorDBG – command-line debugger.  To use CorDbg, you must compile the original C# file using the /debug switch.
2.   DbgCLR – graphic debugger.  Visual Studio .NET uses the DbgCLR.

What’s a delegate?

A delegate object encapsulates a reference to a method. delegate is a function pointer

How is method overriding different from method overloading?

When overriding a method, you change the behavior of the method for the derived class.  Overloading a method simply involves having another method with the same name within the class.

What are the different ways a method can be overloaded?

Different parameter data types, different number of parameters, different order of parameters.

What’s the difference between an interface and abstract class?

In an interface class, all methods are abstract - there is no implementation.  In an abstract class some methods can be concrete.  In an interface class, no accessibility modifiers are allowed.  An abstract class may have accessibility modifiers.

Can you allow a class to be inherited, but prevent the method from being over-ridden?

Yes.  Just leave the class public and make the method sealed.

What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?

The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array.  The CopyTo() method copies the elements into another existing array.  Both perform a shallow copy.  A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array.  A deep copy (which neither of these methods performs) would create a new instance of each element's object, resulting in a different, yet identacle object.

Can you inherit multiple interfaces?

Can you inherit multiple interfaces? 
Yes, Interface only support multiple inheritance in C#

Is it possible to have a static indexer in C#? allowed in C#.

Is it possible to have a static indexer in C#? allowed in C#. 
No

Is it possible to inline assembly or IL in C# code?

ANS:NO

What's C#



C# (pronounced C-sharp) is a new object oriented language from Microsoft and is derived from C and C++. It also borrows a lot of concepts from Java too including garbage collection. More at http://msdn.microsoft.com/vstudio/nextgen/technology/csharpintro.asp, http://msdn.microsoft.com/library/default.asp?URL=/library/dotnet/csspec/vclrfcsharpspec_Start.htm and http://msdn.microsoft.com/vstudio/nextgen/technology/csharpdownload.asp

Source

Sunday, November 8, 2009

Are there Usability Issues with AJAX?

The nature of updating a page dynamically using data retrieved via AJAX interactions and DHTML may result in drastically changing the appearance and state of a page.
Since the pages get updated dynamically, the state of a page may not remain the same.
So the behavior of a page may need to be defined in each of the following user actions:
  • Navigation using the back or forward buttons of the browser
  • Book-marking a page
  • Sharing a URL
  • Printing a page at any given time
Navigation:
The output of the user actions like a page refresh, forward or back navigation, etc need to be defined.
In this case using a JavaScript framework such as Dojo that provides API's history manipulation and navigation control would be simpler.
Book-marking and URL sharing:
Dojo provides client-side interface for book-marking and URL manipulation.
Printing:
Issues could arise while printing dynamically rendered pages.
Source

Is the server or the client in control in AJAX?

With AJAX the control can be more centralized in a server-side component or a mix of client-side and server-side controllers.

* Centralized server-side controller
In this type of architecture, the controller ensures that the data on the client and the server are synchronized.
* Client and server-side controllers
In this type of architecture the presentation related control, event processing, page manipulation, and rendering of model data is done through Javascript on the client side.
The server-side is responsible for business logic and pushing updated model data to the client.
Both methods are viable depending on the kind of task. However, the centralized server side controller is preferred as in the other case (Client and server-side controllers) the server might not have the knowledge of the state of the client page.
Source

How Ajax is different?

An AJAX application introduces a layer between the user and the server which comprises of the AJAX engine. This eliminates the adhoc interaction between the client and the server and makes the application more responsive.
A browser loads an AJAX engine instead of the web page and then communicates with the server on users behalf as well as provides the user with an interface.
As the communication with the server in AJAX is asynchronous, the user doesn’t have to wait for a server response.
Source

When should I use a Java applet instead of AJAX?

  • Applets provide features like custom data streaming, graphic manipulation, threading, and advanced GUIs which AJAX cannot.
  • However, with the help of DHTML, the functionalities of AJAX can be extended further.
  • AJAX requires that the browser be DHTML and AJAX capable.
  • AJAX-based functionality does need to take browser differences into consideration due to which using a JavaScript library such as Dojo which abstracts browser differences is recommended.
  • AJAX/DHTML works well for applications where the latest browsers are used.
Source

What is synchronous request in AJAX?

Synchronous AJAX is a process that makes a java script to halt or stop the processing an application until a result is sent by a server. The browser is frozen, while the request is processed. The response time is 99.99% quick and fast enough. In case of intrusion for a request or transfer of the file, the browser freezes may be for two minutes until the time is out for the request. The advantages of using synchronous AJAX are, simple to code and can be used in the events ‘onunload’ and ‘onbeforeunload’.
 Source
Disclaimer:- All articles are not written by me.i copied some useful definition and tutorials from others site, copied site location is shown in all articles bottom as source.