Enter your Sign on user name and password.
» Computer Science » C# » Arrays, Stacks, Queues & Dictionaries
I. Introduction: Lecture 12 | 41:29 min
In this lesson our instructor talks about Arrays, Stacks, Queues & Dictionaries
Post by Thuy Nguyen on September 11, 2014
Hi Professor Snape, I also thought that you had to initialize an array before you use it, but I tested out a double[,] array Without initializing it via a for loop. Then I printed its value and saw that the default value is 0.I also made an array of enum values, without initializing it. Again, the array is automatically filled with a default value (the first value in the enum).So I see that we don't need to initialize an array via a for loop to start using it because the array is automatically filled with a default value (based on the type of array).