IEnumerable

There are 2 entries for the tag IEnumerable
I ran into the same old "cannot serialize value myType of type myType" issue the other day and knew immediately that I should check that my classes were marked with the [Serializable] attribute. Well, I checked and all of the classes had the attribute as required. So I spent an hour our so searching the web for other reasons why we might get this error. I found nothing. So I pinged a buddy of mine and I walked him through the issue. He said, "It's gotta be one of your classes missing the Serializable ......
Despite "The Cost of Premature Optimization", it's useful to know how things work so you can do basic things to avoid bad performance. In the end, the example below is trivial and doesn't have a significant effect on performance (at least as it applies in my application). However, knowledge of IEnumerable and yield can come in handy when it really counts. As I was writing a bit of code, I wondered if order matters when it comes to query expressions. Specifically, I have an enumerable that I was applying ......