Interview Ques.

1) Can we use pointer in c# ?
 Ans : Yes,C# supports pointers, you use the unsafe keyword to use pointers.

2)  Why we use pointer in C#.NET with Unsafe keyword?
Ans :  In C# the value can be directly referenced to a variable, so there is no need of pointer. Use of pointer sometime crashes the application. But C# supports pointer, that means we can use pointer in C#.
The use of pointer in C# is defined as a unsafe code. So if we want to use pointer in C# the pointer must be present in the body of unsafe declaration. But pointer does not come under garbage collection.
3)  Who is faster hashtable or dictionary ?
Ans : Dictionary is faster than hashtable as dictionary is a generic strong type. Hashtable is slower as it takes object as data type which leads to boxing and unboxing.

4) What is Difference between hash table and Dictionary?
Ans : Dictionary is typed (so valuetypes don't need boxing), a Hashtable isn't (so valuetypes need boxing). Hashtable has a nicer way of obtaining a value than dictionary IMHO, because it always knows the value is an object.

5) Difference between array and Arraylist?
Ans : Array is the collection of values of the same data type. But array list is used to store and retrieve the variables of different data type. Array is used for fixed size while array list is dynamically increasing at run time that is size of array list increasing as per requirement.Read Example.