C#, .NET - jyotiprasadpal/useful-resources GitHub Wiki
Questions
CLR Basics
What is the difference between HashTable and dictionary?
Why you should override GetHashCode when you override Equals?
Types
Is static good? if yes when? Explain use of static from thread safety and unit test-ability perspective?
Give examples of immutable types in C#?
What are the pros and cons of immutable types?
Design immutable type.
Explain how memory will be allocated in below code?
class A {
int a = 10;
string s;
public A() {
s = "hello";
}
method() {
int b = 20;
}
}
A a = new A();
a.method();
A customer type has id and name. How to sort customer based on id/name?
Collections
How hash table works?
Design a type Employee to be used as key in dictionary?
Implement LinkedList type. How to make LinkedList iterable so that you can use foreach loop?
Events and Delegates
Why events exist? What are the advantages of events over delegates?
Threading
When can race conditions happen?
Give an example code when deadlocks can happen?
Why lock on value types and lock on this not advisable?
Can we access UI control from non UI thread in WinForms/WPF? if so, how?
update Thread 1 from Thread 2 when file download is completed? What are the signalling constructs?