Follow by Email

Interview Questions part 1

When can’t you use ASP.NET to create a Web application?

When you are developing for non–Microsoft Windows Web servers, such as Linux/Apache.

Differences between Web and Windows applications.

1. Web forms use server controls, HTML controls, user controls, or custom controls where as windows forms use the standard windows controls.

2. Web applications are displayed in browser but windows forms has there own window.

3. Web applications run on the server & displayed remotely on client machine but windows applications run & displayed on the same machine.

What’s the advantage of using System.Text.StringBuilder over System.String?

String Builder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it’s being operated on, a new instance is created.

Can you store multiple data types in System.Array?


What’s a delegate?

Using a delegate allows the programmer to encapsulate a reference to a method inside a delegate object. The delegate object can then be passed to code which can call the referenced method, without having to know at compile time which method will be invoked.

Delegate is is type that defines the method signature.( A method signature consists of the name of the method and the type and kind, such as value or reference. A method signature does not include the return type, nor does it include the params modifier that may be specified for the last parameter.)

When we instantiate delegate instance with any of the method then we can call that method through the delegate instance.

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.


Post a Comment