From the course: .NET Fundamentals: Concepts, APIs, and Libraries in the .NET Framework

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Arrays and collections

Arrays and collections

- [Instructor] .NET arrays and collections are similar in that they both allow for the storage and manipulation of multiple items. Both can be used to store and retrieve data and both can be iterated over using a loop. However, collections are considered more flexible and feature rich than arrays. There are a wide variety of collections available. Language Integrated Query, also known as LINQ is a set of features in .NET that allows for the querying and manipulation of data in a concise and expressive way. Both arrays and collections can be queried with LINQ. .NET arrays are derived from System.Array, so the array class itself fits into the .NET type system. Each programming language has its own syntax for declaring arrays. This is the C# version. So look on line nine. I'm instantiating an int array. Notice that I'm not using the new keyword and saying new system array. I'm using a special C# syntax where I use the type,…

Contents