
110Microsoft Visual Studio 2010: A Beginner’s Guide
In .NET, the generic List type is declared as List<T>, or List(Of T) in VB. The T is a type placeholder, where you can specify any type you want. For example, you could create a List<int> for integers or a List<string> for strings, which would be List(Of Integer) and List(Of String) in VB, respectively. In Listing
In addition to List, the System.Collections.Generic namespace has several other generic collections, such as Dictionary, Queue, and Stack. Each generic is initialized by replacing the type parameters with the types you want to work on and then by using the specialized methods of that collection. Whenever you see the type parameter syntax, you should recognize that a generic is being used and you will have an idea of what the code means and how to read it in the documentation.
Summary
What you learned in this chapter were essential skills for upcoming chapters in the rest of the book. Knowing how delegates and events work helps you with
Remember that this was only an introduction to C# and VB and that there is much more to learn about these languages. Of course, this book is about VS and not languages, so the next chapter is where you’ll learn to build VS projects.