.NET SQL INTERVIEW QUESTIONS

11 Jun

Here are some very commonly asked questions in a .NET/SQL Interview..

Q: What is CLR?
Answer: The Common Language Runtime (CLR) is the virtual machine component of Microsoft’s .NET framework and is responsible for managing the execution of .NET programs. In a process known as just-in-time (JIT)compilation, the CLR compiles the intermediate language code into the machine instructions that in turn are executed by the computer’s CPU.

Q: What are lambda expressions?

Answer: Let us start by an example:

delegate int del(int i);

static void Main(string[] args)

{

del myDelegate = x => x * x;

int j = myDelegate(5); //j = 25

}

The left side of the lambda operator (=>) specifies the input parameters (if any) and the right side holds the expression or statement block. The lambda expression x => x * x is read “x goes to x times x.”

Q:What is the difference between hashtable and Dictionary?

Answer: Dictionary is a generic type, Hashtable is not. So, you get type safety with Dictionary, because you can’t insert any random object into it, and you don’t have to cast the values you   take out. Hashtable is thread safe for use by multiple reader threads and a single writing thread, while in Dictionary public static members are thread safe, but any instance members are not guaranteed to be thread safe.

Q: Describe cycles in a ASP.NET Page life

Answer:  To answer this question Please read the following link:

http://msdn.microsoft.com/en-us/library/ms178472.aspx

Q: Is String a Value Type of Reference Type?

Answer: String is a reference type.

Q: IN SSIS Packages What are variables and what is variable scope?

Answer:  A variable is used to store values. There are basically two types of variables, System Variable (like ErrorCode, ErrorDescription, PackageName etc) whose values you can use but cannot change and User Variable which you create, assign values and read as needed. A variable can hold a value of the data type you have chosen when you defined the variable. Variables can have a different scope depending on where it was defined. For example you can have package level variables which are accessible to all the tasks in the package and there could also be container level variables which are accessible only to those tasks that are within the container.

Q: What is the use of Sequence Containers in SSIS Packages?

Answer: Using Sequence Containers lets you handle the control flow in more detail, without having to manage individual tasks and containers. For example, you can set the Disable property of the Sequence container to True to disable all the tasks and containers in the Sequence container.

If a package has many tasks then it is easier to group the tasks in Sequence Containers and you can collapse and expand Sequence Containers.

Q: What does NullIF expression in SQL do?

Answer: NULLIF returns the first expression if the two expressions are not equal. If the expressions are equal, NULLIF returns a null value of the type of the first expression.

NULLIF ( expression1 , expression2 )

 

Thanks for reading my post. If you would like me to post more questions please comment in the section below.

About these ads

One Response to “.NET SQL INTERVIEW QUESTIONS”

Trackbacks/Pingbacks

  1. Nullification is Unconstitutional « CITIZEN.BLOGGER.1984+ GUNNY.G BLOG.EMAIL - June 13, 2012

    […] .net Sql Interview Questions (priconnects.wordpress.com) […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 1,028 other followers

%d bloggers like this: