Abstract
In this chapter, we will introduce collections and arrays, and show that they are a very powerful tool for making game code scalable and more flexible. We also introduce interfaces in this chapter, and we show that they define the way the collection classes are related to each other. We also discuss the foreach instruction and how it is used to traverse all the elements in an array or a collection. Finally, we discuss the relationship between arrays and strings.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsAuthor information
Authors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Egges, A., Fokker, J.D., Overmars, M.H. (2013). Collections of Game Objects. In: Learning C# by Programming Games. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-36580-5_12
Download citation
DOI: https://doi.org/10.1007/978-3-642-36580-5_12
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-36579-9
Online ISBN: 978-3-642-36580-5
eBook Packages: Computer ScienceComputer Science (R0)