Another geeky post.
We built our own query system several years ago. It used the concept of "query by example" with templates that were interpreted into SQL. You could generate the equivalent of an "IN" clause by assigning something that implemented System.Collections.ICollection to a template property. Recently, with the introduction of generics and the generic collections, we decided to relax that contract to IEnumerable since that's really the least common denominator of all collections. This produced some hilarious results. As you can imagine, anywhere where we were using strings to specify template values, they were being interpreted as collections of characters. This manifested itself mostly by having queries return nothing, since our system properly handled Chars and treated them as strings.
But, this reminded me of a similar incident a few years ago that involved a framework that rendered objects as comma-separated values. So, instead of:
Mark, Miller
You'd get:
M, a, r, k, M, i, l, l, e, r
I thought since I had been bitten twice, I would write it down. I usually don't forget stuff I take the time to write down.
So, the moral of the story: Remember that even though System.String implements System.Collections.IEnumerable (and now System.Collections.Generic.IEnumerable<System.Char>), you usually don't want to treat it as a collection. You may need to special-case it.
Anyone else think of another type like this?