I have been using C# for many years now in game dev and I love it. Most hardcore C++ guys have always given me grief but I still think the language is beautiful! Yes yes, its memory managed but thats a whole beast unto its self. At least I don’t have to spend a week looking for an illusive overwrite or leak. But each unto their own, we all make games and in todays world, fast to market is a big deal, especially with little to no budget.

One of the great things in C# is Lists. For those of you who don’t know them, they are basically dynamic arrays with a whole host of special functions. They are wonderful things, especially for inventory systems. There is a lot of debate about if they are significantly slower than arrays but the general rule is don’t add to them in a critical update loop. Besides being able to add and remove items dynamically, you can also just bake the list to an array using ToArray(). This way you can have a list that you use to manage your stack and once you are done, you can just bake it out.

So what I want to chat about here is Linq, which is C#’s look up language for lists. I always stayed away from it, erring and my years for “Doing things the right way” but Linq used in the right way can save you a lot of time. I have started using it for my data structure look…