Can anybody give a simple Deadlock sample code in c# ? And please tell the simplest way to find deadlock in your C# code sample. (May be the tool which will detect the dead
For the deadlock sample code, try using lock(this) in your class to simulate the deadlock scenario. Checkout this example.
lock(this)
Following two worthy reading articles detects the deadlock at runtime and discusses ways to avoid them.