Summary


In this chapter, you’ve seen the C# notation to create and use simple, multidimensional and jagged arrays. The Array class is used behind the scenes of C# arrays, and this way you can invoke properties and methods of this class with array variables.

You’ve seen how to sort elements in the array by using the IComparable and IComparer interfaces. The features of the IEnumerable, ICollection, and IList interface as implemented with the Array class was described, and finally you’ve seen the advantages of the yield statement that is new with C# 2.0.

For more information about arrays and related topics, you can read these chapters: Chapter 6 focuses on operators and casts where you can read about creating a custom indexer. Chapter 7 gives you information about delegates and events. Some methods of the Array class use delegates as parameters. Chapter 10 is about collection classes that already have been mentioned in this chapter. Collection classes give you more flexibility of the size, and there you can also read about other containers such as dictionaries and linked lists.




Professional C# 2005 with .NET 3.0
Professional C# 2005 with .NET 3.0
ISBN: 470124725
EAN: N/A
Year: 2007
Pages: 427

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net