Tag Archives: Tips



Use of Interlocked in Race Condition

Multi-Threading is not new to the programming world. We use multi-threading in our application to enhance the throughput and responsiveness of the application, but with concurrent access of certain resources, the application is prone to deadlocks and Race conditions. The post will guide you through how to avoid such kind of scenarios.

Use of SpinLock for ThreadLocking

Yesterday, I have posted one tip which discusses how you could use ReaderWriterLock to implement shared locking on items that does require concurrent access. Today I will use SpinLock to do the same. SpinLock like Monitor spins a number of CPU cycles when it tries to acquire a lock. Monitor on the other hand Spins […]

Dealing with HWND in WPF

If you are trying to run a WPF application, you must remember that WPF content is actually constraint to a single HWND. You could have only a single window handle that represents the entire window, and everything inside it is a bitmap drawn on the WPF canvas. Except Popup (which eventually have its own HWND) […]

Automatically Show the Output Window During Build in Visual Studio

The Visual Studio IDE Output window displays status messages for various features with in IDE  include build errors, compilation error, Project configuration information, that occur when a project is compiled. This window is very much important to see what your application doing during build. Now, this windows is by default turn off. So when ever […]

Common Table Expressions

If you think only .NET languages are the only thing that is getting evolved day by day while SQL Syntaxes remains constant, you might have to think it again. SQL Server is gradually coming with evolution day by day with some alternative syntaxes of writing SQL Statements to make more complex SQL statements easier to […]