Quantcast
Channel: Over It. » C#
Browsing latest articles
Browse All 5 View Live

My UnWordify Extension Method

Tim Barcz is looking for a solution to an interesting problem in his Coding Contest: Create a Programming Pearl post. I decided to challenge myself by writing my solution as a single “line” of code:...

View Article


Image may be NSFW.
Clik here to view.

Splitting CamelCase With Regular Expressions

On my new project, I needed to split a method name up into its constituent parts. For Ruby programmers, this is easy: just split on underscores. For us .NET programmers, we need something a little...

View Article


RogueSharp

I just pushed a pet project of mine up to GitHub today. It’s a port of the original game of Rogue from C to C#. It’s not complete–it doesn’t save your progress and let you continue on later, but it is...

View Article

One-line lazy initialization

Is this too obscure? public class MyObject { private MyExpensiveObject _myExpensiveObject; public MyExpensiveObject ExpensiveObject { get { return _myExpensiveObject ?? (_myExpensiveObject = new...

View Article

Why won’t my iterator throw?

I ran into a spot of confusion last night doing some TDD on a method that returns an IEnumerable<T>. I was using multiple yield return statements in it which made the method an iterator and not...

View Article

Browsing latest articles
Browse All 5 View Live