Collection was modified; enumeration operation may not execute.

I’m sure one of the first exceptions any of us get as C# devs is when we try to iterate over a List (or other enumerable) and attempt to remove an item. This results in the exception: InvalidOperationException was unhandled. Collection was modified; enumeration operation may not execute. The easy solution is just to create […]

.

Read more

NFop (ApacheFop.Net) with J# in .NET 4.0 and DotNetNuke 6

Recently we had a client that wanted to upgrade their web application containing modules we had written for them a long time ago for DotNetNuke 4.3 and they hadn’t had any upgrades since.  Fortunately the content on the site was fairly minimal so we decided just to set up a new instance of DNN 6 […]

.

Read more

The Task Parallel Library and System.Collections.Concurrent Namespace

Arguably one of the biggest parts of .NET 4.0 was the Task Parallel Library (TPL). The TPL makes it ridiculously easy to parallelize code. With Parallel.ForEach, Parallel.For, Parallel.Invoke, and Task.Factory developing for today’s multi-core systems should be a matter of fact. Recently I was tasked with optimizing a large code base to utilize the TPL. […]

.

Read more

String comparisons

At one of the blogs I most frequent there was a post asking, “Where is the bug?”. In the comments section it was mentioned, Use ToUpperInvariant rather than ToLowerInvariant when normalizing strings for comparison. Sure enough if you go to the Microsoft page on it, it says Use the String.ToUpperInvariant method instead of the String.ToLowerInvariant […]

.

Read more

WP7, ApplicationBar, ImageUri and the Icon not showing up

Build Action: Content Copy to Output: Copy always (or ‘Copy if newer’, either should work) I spent a half an hour trying to figure out why my application bar was showing an “X” instead of the image I was putting in IconUri. When first adding images the properties default to: Build Action: Resource Copy to […]

.

Read more

Programming for Maintenance

Code Complete defines Maintainability as “The ease with which you can modify a software system to change or add capabilities, improve performance, or correct defects.” I’ve been thinking for awhile now about this post and I’ve been unsure of exactly what needs to be here.  I know I’ve done a lot of maintenance work.  It’s […]

.

Read more

Development for iPhone and Android with Mono

Update 2024-02-17: It’s kind of funny rereading this considering lately I’ve been doing a bunch of Maui dev. Okay, for the first time ever I’m a bit jealous of iPhone users.(See below)  Novel (the sponsor of Mono) has released the MonoTouch, a C# and .NET development platform for the iPhone.  Granted it’s $400 for the […]

.

Read more

ACM’s Software Engineering Code of Ethics and Professional Practice

Update 2023-02-17 – I’ve updated the link to the most version of the code discussed here. The post is based on the original code, which has been superseded. As such it’s no longer applicable. Please follow the link and read the updated code. Recently I came across ACM’s Software Engineering Code of Ethics and Professional […]

.

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