Deborah's Developer MindScape






         Tips and Techniques for Web and .NET developers.

Archive for May, 2010

May 28, 2010

Building a Connection String at Runtime

Filed under: C#,VB.NET @ 7:54 pm

There are some scenarios that require building a connection string at runtime. For example, if you are building a database utility or if your application allows working with multiple databases. In these cases, you may want to ask the user for the basic parts of the connection and not require entry of a syntactically correct […]

May 17, 2010

Visual Studio Window | New Window

Filed under: C#,VB.NET,Visual Studio @ 10:12 am

With the new multi-monitor support, an underused Visual Studio menu option just became much more useful. You can use the Window | New Window option to view a second code window with the same code file. The result looks like this: You can then drag one of the code windows so they are side by […]

May 14, 2010

Bay.NET Event: .NET 4.0 and VS 2010

Filed under: General,User Group @ 7:52 pm

We are lucky to have two of Redmond’s finest down here in Silicon Valley for a full day .NET 4.0 and VS 2010 event on May 15, 2010. Click here for more information or to register. I am happy to be providing one of the talks at the event. I am giving the "What’s New […]

May 7, 2010

LINQ: Mean, Median, and Mode

Filed under: C#,Lambda Expressions,LINQ,VB.NET @ 2:23 am

If you are doing any type of statistical analysis, you probably need to calculate mean, median and mode. There are lots of places on the Web you can find the calculations. This post is different than most in that it uses LINQ and Lambda expressions. Mean is the statistical average of a set of numbers. […]

May 5, 2010

Multi-dimensional Arrays and IEnumerable

Filed under: C#,Lambda Expressions,VB.NET @ 12:19 am

Most of the cool extension methods that you can use with Lambda expressions, such as Where, FirstOrDefault, and Zip, are extensions of the generic IEnumerable<T> class. Interestingly, the .NET multi-dimensional array does not implement the generic IEnumerable<T> class. So you don’t have direct access to any of the Linq extension methods. The reason for this […]

May 4, 2010

Lambda Expressions: Zip

Filed under: C#,Lambda Expressions,VB.NET @ 11:33 pm

One of the new features in C# 4 and VB 10 (.NET 4.0) is the Zip extension method on IEnumerable. This method allows you to merge two lists such as two arrays or two generic List<T>. The Zip extension method merges the two sequences by matching up each item in one sequence with another item […]

Grouping and Summing with Lambda Expressions

Filed under: C#,Lambda Expressions,LINQ,VB.NET @ 12:43 am

There are often cases where you need to group on multiple properties and potentially sum on others. This post details how to group and sum on multiple properties using lambda expressions. This example uses an Invoice class, since that provides many opportunities for summing. First, here is a basic Invoice class. In C#: class Invoice […]

May 3, 2010

VS 2010 Database Project: Adding Stored Procedures

Filed under: C#,VB.NET,Visual Studio @ 1:37 am

The new Visual Studio 2010 Database Project, as described in this prior post, makes it easy to work with scripts for an existing database or build new scripts directly within Visual Studio. This post details how to add stored procedure scripts to a Database project Start by adding a VS 2010 Database project to your […]

VS 2010 Database Project: Building and Deployment

Filed under: C#,VB.NET,Visual Studio @ 12:52 am

The new Visual Studio 2010 Database Project, as described in this prior post, makes it easy to manage the scripts for your database from within Visual Studio. This includes building the schema scripts from the individual database object scripts and deploying the scripts back to the database. One of the ways that the new VS […]

VS 2010 Database Project: Adding Tables

Filed under: C#,VB.NET,Visual Studio @ 12:43 am

The new Visual Studio 2010 Database Project, as described in this prior post, makes it easy to work with scripts for an existing database or build new scripts directly within Visual Studio. This post details how to add table scripts to a Database project Start by adding a VS 2010 Database project to your solution […]

Next Page »

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

Network-wide options by YD - Freelance Wordpress Developer