Patrick Steele's .NET Blog
Implements ICodeWithDotNet
-
Rhino.Mocks, Lambdas and Expectations
An interesting post on the Rhino.Mocks users list that I thought I’d share.
-
Building Paths Fluently
If you ever need to “build” a path (i.e. “C:\folder1\subfolder”), you really should be using Path.Combine. It makes sure the trailing directory separator is in between the two paths (and it puts the appropriate character in – DirectorySeparatorChar). I wanted an easier way to build a path than having to constantly call Path.Combine so I created a handy little extension method that lets me build paths “fluently”:
-
Updates to Nino’s .hgignore files for Visual Studio
As I move more of my repositories from SVN to Mercurial, I’m constantly referring to Nino’s sample .hgignore file he provided for Visual Studio developers. I always start with his file but add a few more lines and thought I’d share them here. Start with Nino’s .hgignore file and add the following two lines at the bottom:
-
Verbosity Isn’t Always a Bad Thing
There was a message posted to the Rhino.Mocks forums yesterday about verifying a single parameter of a method that accepted 5 parameters. The code looked like this:
-
Backing Up with FTP
I finally set aside some time to upgrade to Windows 7. Most everyone else in the office has already upgraded. I was holding out so I could finish up a few client projects and get the Ann Arbor GiveCamp website up and running. Now it’s my turn!
-
Tweaking log4net Settings Programmatically
A few months ago, I had to dynamically add a log4net appender at runtime. Now I find myself in another log4net situation. I need to modify the configuration of my appenders at runtime.
-
Ann Arbor Day of .NET 2010 Recap
Had a great time at the Ann Arbor Day of .NET on Saturday. Lots of great speakers and topics. And chance to meet up with friends you usually only communicate with via email/twitter.
-
Putting a base in the middle
From Eric Lippert's Blog:
-
Talks Submitted for Ann Arbor Day of .NET 2010
Just submitted my session abstracts for Ann Arbor's Day of .NET 2010.
-
Flattening a Jagged Array with LINQ
Today I had to flatten a jagged array. In my case, it was a string[][] and I needed to make sure every single string contained in that jagged array was set to something (non-null and non-empty). LINQ made the flattening very easy. In fact, I ended up making a generic version that I could use to flatten any type of jagged array (assuming it's a T[][]):