How to pause / resume a thread in C#

Posted by Anuraj on Sunday, June 16, 2013

.Net ASP.Net Windows Forms

Here is the code snippet which will help you to pause / resume a thread using ManualResetEvent class. Both Suspend() and Resume() methods are deprecated in .Net Framework. So both of these methods not recommended to use.

Unexpected error encountered opening Visual Studio project

Posted by Anuraj on Wednesday, June 5, 2013

.Net .Net 3.0 / 3.5 Version Control Visual Studio Windows Forms

Today while opening a win-form project, I got an exception message like this from Visual Studio.

Unit Testing Windows Phone Applications

Posted by Anuraj on Monday, May 6, 2013

.Net CodeProject Unit Testing Visual Studio Windows Phone

Recently Microsoft released Update 2 for Visual Studio 2012. If you installed the Update 2, you will get a new project template, under Windows Phone, Windows Phone Unit Test App.

How to use existing Database in Windows Phone

Posted by Anuraj on Saturday, May 4, 2013

.Net .Net 3.0 / 3.5 CodeProject Windows Phone

Normally in Windows Phone apps, we used to create Database in the Application Launch event, like the following if (!dataContext.DatabaseExists()) { dataContext.CreateDatabase(); }

Retrieving the COM class factory for component failed due to the following error: 800702e4.

Posted by Anuraj on Thursday, May 2, 2013

.Net .Net 4.0 Office Interoperability Visual Studio Windows Forms

While working on some outlook C# application I got a COM exception like this.

Assembly Binding Redirection in .Net

Posted by Anuraj on Thursday, May 2, 2013

.Net .Net 4.0 ASP.Net Windows Forms

Today I come across an application crash due to version mismatch. The application executable was compiled using version 1.0.x.x, and we were using 6.2.x.x. Due to this version mismatch application was crashing.

How to apply border color for TableLayoutPanel

Posted by Anuraj on Thursday, May 2, 2013

.Net .Net 4.0 Windows Forms

The TableLayoutPanel control arranges its contents in a grid. TableLayoutPanel doesn’t have border color property, but you can write custom code in CellPaint event to create border. Here is the code snippet which will help you to create border and apply color for TableLayoutPanel

Copyright © 2017 - Anuraj P. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Hosted with ❤ by GitHub