Making Classes and Properties Immutable

Update 2024-02-16:Rereading this far into the future from when it was written is kind of prophetic. We would just use Record now in .NET but it’s still an interesting bit of history. In the article I refer to .NET 2 and 3 but obviously I’m referring to .NET framework. Hopefully we all know string is […]

.

Read more

foreach loops on arrays

Just a quick note here on foreach loops. Not sure if you knew this but foreach loops can be used to iterate over multidimensional arrays. Imagine you have: you can iterate over the whole 3D array here in a single foreach: The resulting output is: 012345012345. This will only work for multidimensional arrays. For jagged […]

.

Read more

Microsoft’s 101 LINQ samples

I wanted to let you all in on a little secret.  When I am feeling the urge to write a linq post and can’t find something write about I go to Microsoft’s 101 LINQ samples.  For the most part they’re simple examples of a lot of the features that LINQ has to offer.  The list is […]

.

Read more

Databinding, ListView/GridView and Converter

Had some trouble with using a converter when databinding on a GridView yesterday so I thought I’d do a quick write up. Imagine for one instance you have the following class: Now imagine you have the following xaml: To bind to the grid all you would have to do on the window load event is: […]

.

Read more

T1, T2, T3, T4, TResult, Hut, Hut, Hike

This post is kind of not LINQ related, kind of LINQ related. I’ve mentioned lambdas before but wanted to move more into what is more at the core of lambdas. That is more along the lines of delegates. We all know about delegates, don’t we? “No Brian, we don’t.” “Ivan is that you?” (Yes, I’ve […]

.

Read more

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
FormatException

928 East Plymouth Drive Asbury Park, NJ 07712