Apr
11th | 2008

Free Tool - Extract Hard Coded Strings to Resource Files

Posted by Shahar Y |
Filed under .Net, C#, Utilities, Visual Studio |

Recently, I ran into a great free Microsoft tool which is called - Resource Refactoring Tool. This tool provides developers an easy way to extract hard coded strings from the code to resource files.
Resource files (.resx files) consists of XML entries, which specify objects and string inside XML tags. Those files can be opened with [...]


Continue Reading...
Mar
22nd | 2008

3 Ways to Run NUnit From Visual Studio

Posted by Shahar Y |
Filed under C#, Visual Studio |

Like it or not, whoever wants to have a stable code, need to write unit tests. There are 2 main unit testing frameworks for .Net Environment: MBUnit and NUnit.  During this post, I am going to focus on NUnit and its integration with Visual Studio in particular.                               

Once we wrote our unit tests and compiled them, [...]


Continue Reading...
Mar
14th | 2008

How to Get Visual Studio to Create New Classes Public by Default

Posted by Amit |
Filed under .Net, C#, Visual Studio |

This is a good one!
Every one knows that when you add a new class to a project it is private by default, but still when you compile for the first time, the compilation fails and only then you remember to add the “public” before the class name. Tired of this? Here’s what you do in [...]


Continue Reading...
Jan
14th | 2008

How to Solve error CS0103: The name ‘InitializeComponent’ does not exist in the current context

Posted by Amit |
Filed under C#, Visual Studio, WPF |

Hi.
Ever had the following error in Visual Studio:error CS0103: The name ‘InitializeComponent’ does not exist in the current context.I sure did…
There’s a very specific reason for this and it’s in the project settingsThis usually happens whenever you try to add a WPF control/window to a .NET 2.0 Class library or project. The reason for this [...]


Continue Reading...
Jan
8th | 2008

How to Implement a Generic State Machine

Posted by Amit |
Filed under .Net, C#, Visual Studio |

Hi all.
In the course of my work i was in the need of a State Machine. i decided to implement a Generic version of the State Machine so I can reuse it if i will need it again. i started with defining the needs of a basic state and i can up with the [...]


Continue Reading...
Jan
5th | 2008

How to Use Hierarchical DataTemplates - Improved !!!

Posted by Amit |
Filed under .Net, C#, Visual Studio, WPF |

Hi all.
First of all Let me give credit to Shahar A. for showing me this.
As it turns out, my latest post about DataTemplates was not the most efficient way to do this.
I used a different Template for the root and a second one for the all the rest of the data.
What i learned is that [...]


Continue Reading...
Dec
27th | 2007

How To Use Hierarchical DataTemplate in WPF

Posted by Amit |
Filed under .Net, C#, Visual Studio, WPF |

Hi all.
I am going to show you a simple example of how to use Hierarchical DataTemplates in a tree view for an easy display of hierarchical Data.
The Example shows the links in a WebPage recursively.
First we will create the data model that we want to show, note that we have two separate models, one [...]


Continue Reading...
Dec
22nd | 2007

How to Suppress / Disable Script Errors in WebBrowser Control

Posted by Amit |
Filed under .Net, ASP.Net, C#, Visual Studio |

Hi all.
I am currently writing an application that uses the WebBrowser control to perform operations on web pages.Unfortunately I stumbled upon a very annoying problem, sometimes an Internet explorer script error window pops up and stops all execution until you click the OK button.I’ve searched the web for hours and the same answer came [...]


Continue Reading...
Dec
17th | 2007

How to Compile from Windows Explorer / Total Commander

Posted by Amit |
Filed under .Net, C#, Utilities, Visual Studio |

Hi all.
Are you dreaming of compiling/building binaries without waiting hours for Visual Studio to open up?
Well Now you can!
This is something nice I picked up from one of the Integration guys at work
To download the fileSubscribe to our feed and you will find it at the bottom of it
double click it and your there…
The [...]


Continue Reading...
Dec
14th | 2007

How To Create Code Snippets Easily

Posted by Amit |
Filed under Visual Studio |

Hi allWhenever I want to create a code snippet I usually take an already created one and change the XML file to suit my needs.
well NO MORE!!!!
introducing Snippy the Code snippet editor, creating code snippets was never so Easy!!!
let’s check out the tool with a snippet I wrote for a class with one variable [...]


Continue Reading...

Search Dev102