Initializing Arrays

This lesson covers initializing static, dynamic and implicitly typed arrays.

Initializing Static Arrays

An array can be declared and filled with the default value using square bracket ([]) initialization syntax. For example, creating and initializing an array of 5 integers:

Get hands-on with 1400+ tech skills courses.