GoTo: goto GoTo;

Recently while looking over the shoulder’s of some fellow devs I was witness to something disturbing.  If you haven’t guessed by now it was a goto statement.  An intern we used to have had used gotos in a switch(case) statement since in C# switch(case) doesn’t allow fall-through. You have to do: I have to admit […]

.

Read more

Generics, Params, IEnumerables (well, yield), Oh my!

Hello all, Well, what once was a simple weekly email about cool stuff I ran across while working in DotNet has suddenly become very complicated. I spoke briefly with the devs on Generics the other day and wanted to throw together a more concrete example of using them. In the attached solution you will find […]

.

Read more

WPF – ContentProperty, it’s that simple

So there I am, creating a custom control called “RequiredLabel” thatinterestingly enough is a label that has a cool icon in it to show thatwhatever it is being used for is required. The control has twoproperties, Text that is the text of the label and Style that is thestyle of the label. Both are registered […]

.

Read more

WPF and MousePosition

The way I thought it should be done (but it’s wrong): “Mama Freeda! Dang window won’t go where I put it!” Okay, maybe I didn’t say “Mama Freeda” nor “Dang” but none the less itseems like when getting a mouse position in WPF and trying to open a newwindow relative to the mouse click is […]

.

Read more

Namespace Aliasing

When working with WPF, though this is applicable universally, a lot oftimes you end up working with both the old WinForms stuff and the newWPF stuff.  The object names between the two namespaces are almostidentical which can be a real pain meaning anytime you reference “Label”in code (but outside the XAML) you have to use […]

.

Read more

be ^ !be

 Unlike the & and | logical operators which seem to have dubious use the^ (XOR, exclusive or) logical operator can make things quite a bit easier. For instance ever write a IComparable? rather then: you can just do: like the other logical operators both sides of the conditional must beevaluated but since we’re doing exclusive […]

.

Read more

?? Is the way of the WORLD, HAHAHA

Recently I gave a quick talk to the devs at the court house about thecoalesce operator. So why do you care? Well, you probably don’t sojust quit reading right now. For those of you that are still around the coalesce operator works likeCOALESCE in T-SQL. For instance: Here in T-SQL we can see a simple […]

.

Read more

Stop that build!

I’m sure we’ve all clicked build by accident, especially with a dnn project. Did you know you can stop it? Ctrl + Break ref:stevenharman.net

.

Read more

Self-referencing Bindings

Between keeping up with what’s coming for .Net 4.0 as well as the end of a large DOD contract I’ve been a bit busy (and no developer fatigue, just busy :)). But don’t fret loyal readers, more will be coming soon. Until then here is a bit of xaml for self-referencing bindings. As you can […]

.

Read more
FormatException

928 East Plymouth Drive Asbury Park, NJ 07712