Convert a List in to a Collection

If you have an object that contains a List or IList, and you need to convert it in to a Collection, here is how you can do it in a single line.

[code language=c#]
var foo = new Collection<FooList>(fooList);


blog comments powered by Disqus

About the author

You have probably figured out by now that my name is Bryan Avery (if not, please refer to your browser's address field).  Technology is more than a career to me - it is both a hobby and a passion.  I'm an ASP.NET/C# Developer at heart...

Month List