Deborah's Developer MindScape






         Tips and Techniques for Web and .NET developers.

Archive for October, 2009

October 29, 2009

Visual Studio: Clipboard Ring

Filed under: C#,VB.NET,Visual Studio @ 7:35 pm

Way back when we were using Visual Studio 2005, there was a Clipboard Ring tab in the Toolbox. I loved  that tab! When I am doing a bunch of copy/pastes, I sometimes find that I hit Ctrl+C when I meant to hit Ctrl+V, and poof! my Clipboard was kindly wiped out for me. With VS […]

Unit Testing: Exposing Private Members

Filed under: C#,Testing,VB.NET @ 6:19 pm

Visual Studio 2008 (Professional Edition and above) provides a really nice set of tools for development and execution of unit tests. It is, of  course, easy for your tests to access the public properties and methods of your classes. But what about those private members? [To begin with an overview of unit testing, start here.] […]

Unit Testing: Exposing Internal/Friend Members

Filed under: C#,Testing,VB.NET @ 5:23 pm

Visual Studio 2008 (Professional Edition and above) provides a really nice set of tools for development and execution of unit tests. It is, of  course, easy for your tests to access the public properties and methods of your classes. But what about those internal/friend members? [To begin with an overview of unit testing, start here.] […]

Unit Testing: Testing Properties

Filed under: C#,Testing,VB.NET @ 5:01 pm

Visual Studio 2008 (Professional Edition and above) provides a really nice set of tools for development and execution of unit tests. This post provides suggestions for testing your property getters and setters. [To begin with an overview of unit testing, start here.] Let’s say your Customer class has a LastName property that looks like this: […]

October 25, 2009

Unit Testing: Code Coverage

Filed under: C#,Testing,VB.NET @ 6:27 pm

Visual Studio 2008 (Team System ONLY) provides a really nice set of tools for viewing the code coverage of your unit tests. NOTE: While Visual Studio 2008 Professional Edition has tools for building, executing, and debugging unit tests, it does NOT include the code coverage tools. [To begin with an overview of unit testing, start […]

Unit Testing: Execution

Filed under: C#,Testing,VB.NET @ 5:50 pm

Visual Studio 2008 (Professional Edition and above) provides a really nice set of tools for development and execution of unit tests. [To begin with an overview of unit testing, start here.] This prior post demonstrates how to build a unit test using the "Create Unit Tests…" feature of the Code Editor. This post demonstrates how […]

Unit Testing: An Introduction

Filed under: C#,Testing,VB.NET @ 4:04 pm

If you have Visual Studio 2008 or later and have the Professional Edition or better (NOT the Express Editions), you have some very nice unit testing tools within your Visual Studio environment. These tools help you write, execute, and track your unit tests and code coverage. This post provides an introduction to using these tools. […]

October 20, 2009

Populating a DataGridView from Xml Data

Filed under: C#,Data Binding,LINQ,VB.NET,WinForms,XML @ 11:49 pm

If you are using XML in a WinForms application you may find the need to display the XML data in a DataGridView. Let’s take this XML: <states>     <state name="California">         <abbreviation>CA</abbreviation>         <year>1850</year>         <governor>Schwarzenegger</governor>     </state>     <state name="Wisconsin">         <abbreviation>WI</abbreviation>         <year>1848</year>         <governor>Doyle</governor>     </state> </states> Displaying XML in a DataGridView […]

October 16, 2009

Lambda Expressions: Execution

Filed under: C#,Lambda Expressions,VB.NET @ 3:26 pm

Lambda expressions can be assigned to a delegate variable. The lambda expression is then executed when the delegate is called. [To begin with an overview of lambda expressions, start here.] In the following example, a lambda expression is assigned to a variable (f). In C#: Func<int,string> f = x => (x + x).ToString(); Debug.WriteLine(f(5)); Debug.WriteLine(f(10)); […]

October 13, 2009

WinForms User Controls 101

Filed under: C#,VB.NET,WinForms @ 11:43 am

The same several questions often come up in the forums regarding the basics of building a user control with VB.NET or C#. The goal of this post is to answer those questions. There are three basic types of WinForms user controls that you can create: Extended control Composite control Custom control Each of these are […]

Next Page »

© 2014 Deborah's Developer MindScape   Provided by WPMU DEV -The WordPress Experts   Hosted by Microsoft MVPs