Free mag vol1 | Page 199

CHAPTER 4  CORE C# PROGRAMMING CONSTRUCTS, PART II  Note Do be aware that if you declare an array, but do not explicitly fill each index, each item will be set to the default value of the data type (e.g., an array of bools will be set to false or an array of ints will be set to 0). C# Array Initialization Syntax In addition to filling an array element by element, you are also able to fill the items of an array using C# array initialization syntax. To do so, specify each array item within the scope of curly brackets ({}). This syntax can be helpful when you are creating an array of a known size and wish to quickly specify the initial values. For exampl