WPF XAML Data Binding Cheat Sheet

I hate posts about posts and try to avoid them. Sometimes, however, neat stuff pops up that you may have not run across before. If you head over to Nbd-Tech and read the post on WPF XAML Data Binding Cheat Sheet you’ll find a great resource for databinding in the form of a pdf. For […]

.

Read more

Often Unused Operators: |= (or equals)

I’ve debated before the usefulness of the | and & operators. The use of the | operator depends on the context in which it is used. In the case of bools a boolean operation is performed. In the case of ints a bitwise OR is performed. For boolean operations when the | operator is used […]

.

Read more

Linear Operations

<rant> We all know O(n) = O(2n), right?  I mean, we’re talking about how algorithms scale here.  Linear is linear.  I add 100 more elements to my dataset and the time to finish what ever I was doing scales linearly. Now that’s all fine and good but think a bit when working with code. Just […]

.

Read more

Extension Methods Practically Applied

It seems odd to me that I’ve never spoken on extension methods considering the broad range of subjects I’ve covered. So here I am writing on them. So what are extension methods? They are methods you can tack on to existing objects to extend their functionality without having to extend them. “Brian, if you want […]

.

Read more

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
FormatException

928 East Plymouth Drive Asbury Park, NJ 07712