O'Reilly logo

A Programmer's Guide to C# 5.0, 4th Edition by Nick Wienholt, Eric Gunnerson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 33

image

System.Array and the Collection Classes

Many useful operations can be performed with arrays and the .NET Framework collection. This chapter details how the operations are performed and which interfaces and functions are required to enable specific functionality.

Sorting and Searching

The .NET Framework collection classes provide some useful support for sorting and searching, with built-in functions to do sorting and binary searching. The Array class provides the same functionality but as static functions rather than member functions.

Sorting an array of integers is as easy as this:

using System;class Test{    public static void Main() ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required