Q:Difference between Clustered and Non-Clustered Index Data Structures?
Q:Difference between Trace and Debug ?
Q:Difference between Array and ArrayList?
Array list is a class .
Example: http://stackoverflow.com/questions/459677/c-a-strings-split-method
Question: difference between ref and out
When you first create a new table, there is no index created by default. In technical terms, a table without an index is called a “heap”. As you would expect, the data we will insert into the table will be returned in the same order. A non-clustered index is a special type of index in which the logical order of the index does not match the physical stored order of the rows on disk. The leaf node of a non-clustered index does not consist of the data pages. Instead, the leaf nodes contain index rows.
A clustered index is a special type of index that reorders the way records in the table are physically stored. Therefore table can have only one clustered index. The leaf nodes of a clustered index contain the data pages.
Clustered index is good when you know in which order you will be returning the records in most cases. You can create clustered index and after that you don’t need to use ORDER BY statement. This will be much more faster. If the order is not important for you and will not create clustered index by yourself, then primary key will be clustered index by default. There is nothing bad not to have the clustered index, it can speed up inserting rows.
Source:- http://www.allinterview.com/showanswers/8164.html
Q:Difference between Trace and Debug ?
According to Microsoft Documentation there is not much
difference between Trace and Debug Class.
Debug only works in debug mode and trace works in debug and
release both mode.
Q:Difference between Array and ArrayList?
Array is the collection of values of the same data type
>the variables in an array is called array elements
>Array is a reference type data type
>The array structure in System's Memory
Array list is a class .
>when you want to access the elements of an array through its index value location in an array,use an ArrayList.
>The use of the arraylist is an alternative to the use of th array.
>The Methods Of ArrayList class are
1)Add
2)Remove
3)Clear
4)Insert
5)TrimToSize
6)Sort
7)Reverse
Example: http://stackoverflow.com/questions/459677/c-a-strings-split-method
Question: difference between ref and out
The main difference between the two types is in the rule for definite assignment of them.
When we use the out parameter, The program calling the function need not assign a value to the out parameter before making the call to the function. The value of the out parameter has to be set by the function before returning the value.The same is not true for the reference (ref) type parameter. For a ref type parameter, the value to the parameter has to be assigned before calling the function. If we do not assign the value before calling the function we will get a compiler error.
Another important thing to note here is that in case of ref parameter, the value passed by the caller function can be very well used by the called function. The called function does not have the compulsion to assign the value to a ref type parameter. But in case of the out parameter, the called function has to assign a value.
No comments:
Post a Comment