Latest Interview Questions

1. What is the use of Menus?

  • Menus expose functionality to your users by holding commands that are grouped by a common theme.
  • The MenuStrip control is new to this version of Visual Studio and the .NET Framework. With the control, you can easily create menus like those found in Microsoft Office.
  • The MenuStrip control supports the multiple-documen
By: Pankaj Kumar Gupta   |    On:  15 May 2011 03:15:51

1. What are the Performance Considerations in ASP.NET Applications

To achieve the goal of high performance in ASP.NET applications, we have to take care of the Design Considerations, Coding Techniques, Platform Optimizations and .NET Framework Configurations.

The main performance considerations are-

1). Design Considerations

By: Pankaj Kumar Gupta   |    On:  15 May 2011 02:48:56

1. What is Database Normalization?

In relational database theory, normalization is the process of restructuring the logical data model of a database to eliminate redundancy, organize data efficiently, and reduce repeating data and to reduce the potential for anomalies during data operations. Data normalization also may improve data consistency and simplify future extension of the log

By: Pankaj Kumar Gupta   |    On:  24 Mar 2011 08:43:06

1. What is the difference between Authentication and Authorization?

Authentication is the process of identifying and verifying who the client accessing the server is. For example, if you use Windows authentication and are browsing an ASP.NET page from server, ASP.NET/IIS would automatically use NTLM to authenticate you as SYNCFUSION\user1 (for example). Forms based

By: Pankaj Kumar Gupta   |    On:  21 Mar 2011 20:58:26
ASP.NET server controls are components that run on the server and encapsulate user-interface and other related functionality. They are used in ASP.NET pages and in ASP.NET code-behind classes.
 
Custom con
By: Pankaj Kumar Gupta   |    On:  15 Mar 2011 00:58:11
ASP.NET is server side technology used with .NET Web Applications. The main concern with ASP.NET includes 1). Server Side Processing, 2). State Management and 3). Security Model
By: Pankaj Kumar Gupta   |    On:  15 Mar 2011 00:54:59

1.    What are the main objects in ADO.NET used for data access?

The four main objects of a data provider:-

1)    Connection (This object used to connect a data to a Command object.)
2)    Command object (This object used to connect connection object to Datareader or dataset.)
3)  

By: Pankaj Kumar Gupta   |    On:  10 Mar 2011 10:15:06

1. What do you mean by Garbage Collection?

Garbage collection is a CLR feature which automatically manages memory. Programmers forget to release the objects while coding laziness (Remember in VB6 where one of the good practices is to set object to nothing). CLR automatically releases objects when they are no longer referenced and in use.CLR runs on non-deterministic to see the unused

By: Pankaj Kumar Gupta   |    On:  10 Mar 2011 09:59:54

1. What do you mean by Object Oriented Programming?

It is a problem solving technique to develop software systems. It’s a technique to think real world in terms of objects. Object maps the software model to real world concept. These objects have responsibilities and provide services to application or other objects.

2. What is a Class?

A class describes all the

By: Pankaj Kumar Gupta   |    On:  10 Mar 2011 09:23:26

1. What is .NET Remoting?

One Process can have multiple application domains and to invoke a method in an object running in different application domain .NET remoting is used. .NET remoting enables you to build widely distributed applications easily, whether application components are all on one computer or spread out across the entire world. You can build client applications that use

By: Pankaj Kumar Gupta   |    On:  10 Mar 2011 00:41:19

Code

try
            {
                try
                {
                    throw new ApplicationException();
                }
                finally
                {
                    throw new SystemException();

                }

            }
            catch (Exception ex)
            {

                Console.WriteLine(ex.GetType().Name);
            }

Output

SystemException.

Reason

When ApplicationException is raise, it will goes to within the  exception stack, and the  finally block also will run and throw system exception, now system exception also goes to within the exception stack.But when we are print within catch, system exception is most recently added, this is will be retrieved first from stack.so SystemException is result for above code.

 

By: RRaveen   |    On:  10 Feb 2011 01:59:30

Code

var data = "name";
data = 8;
Console.WriteLine(data);

Options

  1. output is 8
  2. its does not compile

Answer:

Its does not compile(option 2).

var keyword is implicit type, so once you are declared  as a specific type, then it  has decide the type automatically with right hand side value.so it won't compile. 

By: RRaveen   |    On:  10 Feb 2011 01:54:06

Answer:

var

If you are use the var keyword, then it valid type against right side value on declaration time

Example:

var data = "name";            
Console.WriteLine(data);

Here var will be string type at compile time.

dynamic

If you are use the dynamic keyword, the type will be decide on run time.

Example:

dynamic data = "name";
data = 8;
Console.WriteLine(data);

it will compile without any error, at run time data variable type is a int than string.because in the second line of code, you have change to string to in value on right hand side.

By: RRaveen   |    On:  10 Feb 2011 01:49:02

Answer

Just call Session.Abandon().

Example

void ClearSession()
{
Session.Abandon();
}

 

By: RRaveen   |    On:  14 Jan 2011 12:40:36

Answer:

By checking the IsPostBack property. If IsPostBack is True, the page has been posted back.

Example

protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
// code
        }
     }

 

By: RRaveen   |    On:  14 Jan 2011 12:36:15

Answer:

  1. Binary Formatter
  2. XML Formatter

 

By: RRaveen   |    On:  04 Jan 2011 01:13:23

1. True

2. False
By: RRaveen   |    On:  25 Dec 2010 11:04:13

Answer:

  1. INNER JOIN
  2. OUTER JOIN(LEFT,RIGHT,CROSS,FULL)

 

By: RRaveen   |    On:  22 Dec 2010 10:18:52

Answer:

A delegate object encapsulates a reference to a method. In C++ they were referred to as function pointers.

By: RRaveen   |    On:  22 Dec 2010 10:12:34

Answer:

Yes,refer below sample code

C# Code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    public class TryCatch
    {
        static TryCatch()
        {

        }
    }
}

 

By: RRaveen   |    On:  22 Dec 2010 10:05:45

Answer:

If you want to prevent a class to create subclass, the class must be sealed. Most of the security classes are sealed.

Sample Code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    public sealed class TryCatch
    {
        public void SaveEmployee(string empID)
        {

               // few line of code here            
            
        }
    }
}

 

By: RRaveen   |    On:  22 Dec 2010 10:01:39

Answer:

  1. Different parameter data types
  2. Different number of parameters
By: RRaveen   |    On:  22 Dec 2010 09:57:09

Answer:

No.if one catch block excuted, then it will directlly go the final block if final block has in method.

Sample Code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class TryCatch
    {
        public void SaveEmployee(string empID)
        {
            try
            {
                // few line of code here
            }
            catch (DllNotFoundException dex)
            {
                throw dex;
            }
            catch (Exception)
            {

                throw;
            }
        }
    }
}

above code only execute DllNotFoundException or Generic Exception if any exception occurred.

By: RRaveen   |    On:  22 Dec 2010 09:52:35

Answer:

The Array has two methods to perform copy operation such as Clone() and CopyTo().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.

By: RRaveen   |    On:  22 Dec 2010 09:42:11

Answer:

1.Call Sort() method for Array Then

2.Reverse() Method for Array.

Sample Code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {

            string[] sample = new string[] { "RRaveen", "John", "Murukan", "Dhan" };            
            Array.Sort(sample);
            Array.Reverse(sample);

            for (int i = 0; i < sample.Length; i++)
            {
                Console.WriteLine(sample[i]);
                
            }
            Console.ReadLine();
         }
     }
}

Output

RRaveen
Murukan
John
Dhan
By: RRaveen   |    On:  22 Dec 2010 09:39:02

Answer:

The Master is common template to create base level or common layout for your whole application. It’s save time and unnecessary repeating layouts create again and again. Master Pages contains content placeholders to hold page specific content.

By: RRaveen   |    On:  22 Dec 2010 09:29:20

Answer:

The web service is a common word to communicate platform independent.Web services allow for programmatic access of business logic over the Web. Web services typically rely on XML-based protocols, messages, and interface descriptions for communication and access. Web services are designed to be used by other programs or applications rather than directly by end user. Programs invoking a Web service are called clients. SOAP over HTTP is the most commonly used protocol for invoking Web services.

By: RRaveen   |    On:  22 Dec 2010 09:24:38

Answer:

Binding is the process of locating the declaration that corresponds to a uniquely specified type. When this process occurs at run time rather than at compile time, it is called late binding.

By: RRaveen   |    On:  10 Dec 2010 01:58:31

Answer:

  1. A DataSet is designed to work disconnected mode but ADO recordset is always work connected mode.
  2. There's no concept of cursor types in a DataSet but ADO RecordSet support to cursor types
  3. You can store many data version in a DataSet, and write them to the original data source in a single operation but ADO Recordset does support to more than one version
  4. DataSet can contain multiple tables but he RecordSet only one table
  5. RecordSet is Required More time than DataSet For data retrival
  6. DataSet is always better than the RecordSet compare for best performance.
  7. Dataset makes the relationship between the table that belongs in dataset.but there are no concepts like relations in ADO Recordset
  8. DataSet support to export many data formats such as XML, HTML and more but ADO Record set not.
  9. DataSet can represent an entire relational database in memory, complete with tables, relations, and views.
By: RRaveen   |    On:  09 Dec 2010 21:31:38

Answer:

  • Integer
  • String
  • Currency
  • Double
  • Date
By: RRaveen   |    On:  09 Dec 2010 21:18:34
^ Scroll to Top