Property Code Snippet for Visual Studio 2005

In contrast to the default Visual Studio format, I prefer to format my properties like this with the associated variable beneath the property declaration and a comment above it <s>: /// <summary>/// OrderID Property/// </summary>public int OrderID{    get { return _orderID; }    set { _orderID = value; }}private int _orderID; My partner in crime Rick Strahl (www.west-wind.com) wrote a blog post about a snippet he created do something similar which gave me the idea to do it to suit my own needs. Here’s what I’ve come up with: <?xml version=“1.0“ encoding=“utf-8“ ?><CodeSnippets xmlns=“http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet“>    <CodeSnippet Format=“1.0.0“>        <Header>            <Title>prop</Title>            <Shortcut>prp</Shortcut>            <Description>Code snippet … Continue reading Property Code Snippet for Visual Studio 2005

Fixing "Rebuild" error when using the Object Test Bench

Lots of folks don’t know that Visual Studio 2005 has design-time expression evaluation that allows you to instantiate objects and execute their methods at design time–a very cool feature. You can do this by right-clicking an object in a class diagram and selecting Create Instance from the shortcut menu (you can also do the same from the Class View window). If you get an error telling you to rebuild the project when trying to instantiate an object in the Object Test Bench (and the error won’t go away), rebuild your project, then select Tools | Options from the Visual Studio … Continue reading Fixing "Rebuild" error when using the Object Test Bench