O'Reilly logo

C# Primer Plus by Klaus Michelsen

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

Declaring and Defining an Array

In certain respects, the array is very similar to the string type, which, for that reason, is often referred to as an array of characters. I expect you to be reasonably familiar with the string class by now and I will briefly use it here to familiarize you with the array concept.

Recall how a variable of type string is able to hold a collection of characters, all neatly ordered and indexed, facilitating easy access to each character as in

which assigns the letter i to ch. Or as in

which counts the number of bs in ...

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