The lambda says, “baaaaa”

LINQ allows you do define simple functions/methods in-line with the query you are doing.  These are called lambda expressions. They have a special format to allow for in-line expressions.   Take a look at: Basically this is: Rather then complicating things with full-blown LINQ queries lets cheat and just use simple arrays. For example: The where […]

.

Read more

Tiptoe Through the Tulips … LINQeses…es

As most can attest when launching into the world of WPF you have to jump in and hope you can figure out how to swim before you drown.  It has a huge learning curve but the end results are usually pretty amazing. LINQ, on the other hand, you can slowly dip a toe in, see how […]

.

Read more

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

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

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