Subscribe to CurtisRutland.Write("...");        RSS Feed
- - - - -

New Extension Method for IList<T>: SafeInsert<T>

Icon Leave Comment
IList.Insert...
- - - - -

DateTime Extension Methods: Floor, Ceiling, and Round

Icon 1 Comments
I came across a thread at StackOverflow when I was looking for a good way to round DateTimes to the nearest given time frame. I thought these were great algorithms, so I modified them a bit to be extension mehtods. Here they are:

...
- - - - -

Some new extension methods: For and ForEach

Icon Leave Comment
I noticed that List<T> has a method called ForEach, that takes an Action<T> and applies it to all elements in the collection. This is not an extension method, it's part of List.

I wondered why it's not part of the LINQ Extension methods. The best I could come up with was that IEnumerables can be infinite, so a non-terminable...
* * * * *

"It doesn't work." That's not good enough!

Icon 18 Comments
Every one of us that reads these forums frequently sees this. You get a post explaining requirements, maybe some code, and then a variant on the phrase that makes my blood boil when no context is provided: "it doesn't work."

There's many variations on it:
"It has errors"
"It doesn't run"
"It...
- - - - -

More extension methods: To and In. Also, a static class to make Sequences.

Icon 2 Comments
Cross-posted from my Blog.

Without further ado, here's a static class I've been working on (code after the break):

...
* * * * *

How we know you're not worth our time.

Icon 5 Comments
Most of the people who answer questions on this site are professionals. We do this for a living. Most of us have put up with enough shit just from work that we won't hesitate for a second to ignore your question if you give us an excuse. That's not to say we're jerks, looking for reasons to ignore you; it means that we're not...

  • (2 Pages)
  • +
  • 1
  • 2

Recent Entries

Recent Comments

1 user(s) viewing

1 Guests
0 member(s)
0 anonymous member(s)