Archive for category .Net

Why WPF? This is why…

http://dnrtv.com/default.aspx?showID=115 Just awesome!  I didn’t see anything far fetched other than they must have a great designer on staff.  I wonder if the designer was doing the Blend work?

Visitor Pattern with Anonymous Methods

I don’t often have the need to implement the Visitor Pattern, but today I was that day.  I looked around really quick for an example of how to do this with Lambda Expressions and Anonymous Methods, which seemed like they were the way to go.  It may be that my search skills have deteriorated right [...]

Virtual Property C# Code Snippet

For those of you who use NHibernate you may find this convenient, if you don’t already have your own.  Below is a C# code snippet for creating a public virtual property (code and file are both there).  Just put it in your <Visual Studio 2005/2008>\Code Snippets\Visual C#\My Code Snippets folder and you’re off and running.  [...]

NHibernate Thinks Your Enum is Dirty

Get your head out of the gutter. It’s important to look at your mapping files closely when trying to diagnose unexpected results.  One of our developers had recently added two properties to our big honkin’ CustomerOrder entity.  These both happened to be enumeration values, which are represented by Int values in the database.  Of course, [...]

Quicky Visual Studio Projects you can Toss to the Curb

When I’m trying to explain things to people or just want to try something out really quick I’ll often create myself a temporary Visual Studio projects that I don’t intend to keep around.  In fact, I have an entire Temp folder full of them.  I always loved that in the VB 6.0 IDE you could [...]

New Year Indeed

It has been quite a New Year so far.  As of today, Monday January 14th 2008, I have left Speedway and the Speedy Rewards™ team and found new employment with SDS Consulting and I have new eyes courtesy of Lasik Plus of Dayton.  I’d say that’s a fairly ambitious first two weeks. I’m still working [...]

ASP.Net MVC and Forms Authentication

So last weekend I picked up the new ASP.Net 3.5 Extensions Preview CTP (and MVC Toolkit) from the ASP.Net team and I’m loving the MVC bits.  I never could get in to MonoRail mainly because I’m a developer diva.  I need intellisense, syntax highlighting, the whole deal.  For a CTP, this release packs quite a [...]

NHibernate Query Generator Installer for Visual Studio 2008

I posted recently a manual .reg file for adding the NHibernate Query Generator custom tool to Visual Studio 2008.  I just sent Ayende an update to the .Setup Product.wxs, a WiX file, which adds a new fixture specifically for 2008.  If you are interested in building the installer and running the trunk of NHQG, below [...]

PerformanceHelper.cs Update: Perfmon, Console, and Debug Output options

I’ve updated my PerformanceHelper class that I’ll throw around certain code blocks to help trend or monitor performance.  Before it was merely a PerformanceCounter wrapper with a few metrics, but now you can specify Console, Debug and/or Perfmon.  You do this by using an XOR ( ’|’ ) in a new Constructor.  Here’s an example which outputs to [...]

WPF Controls TabIndex: Moving to the First Input Control

Here’s one of those real-world situations that no one bothers to demo.  If you are building a form or have some sort of input your gathering from the user, you’ll likely want the first input control Focused initially.  You have a few ways to do this (in ascending order of recommendation): Call Focus() on the [...]

Switch to our mobile site