James Michael Hare

...hare-brained ideas from the realm of software development...
posts - 137 , comments - 1100 , trackbacks - 0

My Links

News

Welcome to my blog! I'm a Sr. Software Development Engineer in Seattle, WA. I've been doing C++/C#/Java development for over 18 years, but have definitely learned that there is always more to learn!

All thoughts and opinions expressed in my blog and my comments are my own and do not represent the thoughts of my employer.

Blogs I Read

MCC Logo MVP Logo

Follow BlkRabbitCoder on Twitter

Tag Cloud

Archives

Post Categories

October 2010 Entries

C#/.NET Fundamentals: Returning Data Immutably in a Mutable World
One of the things I sort-of miss from C++ (it has its good and bad) is the const modifier. Yes, while it’s true that we have a const modifier in C# (as well as readonly), but it’s not quite as robust. Many times you’ll want to return an internal member of a class but not want it to be directly modifiable by the user of that class. This article discusses how to present simple types as read-only. Note: I’m deliberately avoiding creating read-only views of collections in this particular article, but ......

Posted On Thursday, October 28, 2010 6:21 PM | Comments (4) | Filed Under [ My Blog C# Software .NET ]

C#/.NET Little Wonders: ToDictionary() and ToList()
The Little Wonders series received so much positive response I decided to make it a recurring theme in my blog as new ones popped in my head. There are two simple, yet great, LINQ extension methods you may or may not know about, but that can really simplify the task of converting collection queries into collections: ToDictionary() and ToList(). Introduction: LINQ and Deferred Execution Depending on your knowledge of LINQ, you may be oblivious as to what many of these query expressions do behind the ......

Posted On Thursday, October 21, 2010 6:42 PM | Comments (31) | Filed Under [ My Blog C# Software .NET ]

C# 5.0 And Beyond: Upper/Lower Case Format Specifiers
So, I thought of another thing I’d like in my wish list of features I’d love to see in C# 5.0 and beyond. I’d like a format specifier to put the upper or lower case converted format argument into a formatted string. That is, let’s say you are building a distributed cache key that takes as part of the key the host name, but sometimes you may get the same host name in upper, lower, or mixed case on your distributed cache provider is case sensitive in its comparison and you have no control over that. ......

Posted On Monday, October 11, 2010 2:08 PM | Comments (7) | Filed Under [ My Blog C# Software .NET ]

C# Toolbox: A Debuggable, Self-Installing Windows Service Template (2 of 2)
Update: I have now placed the zip containing the source for the end result of part 1 and 2 of this service template here. Two weeks ago I began the series with a discussion on how to make a new C# Windows Service template that is “debuggable” (you can find the article here). I had then intended the next week to follow up with a discussion on how to modify that template to make the service “self-installing”. Unfortunately, with my work schedule I wasn’t able to complete the series last week due to ......

Posted On Thursday, October 7, 2010 4:43 PM | Comments (24) | Filed Under [ My Blog C# Software .NET ]

C# 5.0 and Beyond - My Wish List
I apologize in advance to those waiting for part 2 of the Windows Services post I did last week. I will have a follow-up post next week, this week at work has just been crazy and I haven’t had as much time to devote to the code examples as I’d like to polish it. So instead I thought I’d throw a quick post out on what I’d like to see in the future versions of C#. A lot of folks are posting things they would like to see in C# 5.0 and beyond. There’s a great list on Stack Overflow (here) and a great ......

Posted On Friday, October 1, 2010 10:15 AM | Comments (8) | Filed Under [ My Blog C# Software .NET ]

Powered by: