This morning at work a colleague and myself discovered a slightly alarming difference between `IEnumerable.ForEach` and `List.ForEach` when we switched a collection type for a field in a C# ASP.NET MVC project.
This morning at work a colleague and myself discovered a slightly alarming difference between `IEnumerable.ForEach` and `List.ForEach` when we switched a collection type for a field in a C# ASP.NET MVC project.
This article demonstrates how you can simply enumerate any generic tree depth-first as well as breadth-first using the described construct. Trees can be serialized binary (using the BinaryFormatter), custom binary and as XML.