Tuesday, June 15, 2010

Interview Panel : Asp.Net Questions


View state size Limit :

Maximum view state size limit (128K) exceeded. Actual viewstate size for this page was 174.281K.

Size of Cookies : 4096 Bytes

Dataset Size Limit: 2^32

The default cache size is 128 MB. This is primarily used for hash file data cache in the server. This setting is only can be done in Administrator not in job level. Job level tuning is available only for Buffer Size.

Use of new operator in C#

The new operator is used to create new instances of types. There are three forms of new expressions:

  • Object creation expressions are used to create new instances of class types and value types.
  • Array creation expressions are used to create new instances of array types.
  • Delegate creation expressions are used to create new instances of delegate types.

The new operator implies creation of an instance of a type, but does not necessarily imply dynamic allocation of memory. In particular, instances of value types require no additional memory beyond the variables in which they reside, and no dynamic allocations occur when new is used to create instances of value types.

Main Difference between for and foreach loop :

The for loop executes a statement or a block of statements repeatedly until a specified expression evaluates to false. there is need to specify the loop bounds( minimum or maximum).

int j = 0;

for (int i = 1; i <= 5; i++)
{
j = j + i ;
}


The foreach statement repeats a group of embedded statements for each element in an array or an object collection.you do not need to specify the loop bounds minimum or maximum.

int j = 0;

int[] tempArr = new int[] { 0, 1, 2, 3, 5, 8, 13 };
foreach (int i in tempArr )
{
j = j + i ;
}

Cascade Delete in Sql 2005:

CREATE TABLE test_child

(SUB1 INT,
[NO] int,
FOREIGN KEY ([NO]) REFERENCES Test_parent ON DELETE CASCADE)

2 comments:

  1. It's interesting that many of the bloggers to  helped  clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command.
    SQL Server Training in Chennai

    ReplyDelete