On 06/02/2018 08:35 PM, Neia Neutuladh wrote:
2. `int[4] a = null` treats the initialization as a copy from an array whose value is null. If you run just that line of code, it will produce an error at runtime: "object.Error@(0): Array lengths don't match for copy: 0 != 4"

If you want to initialize every member of an array with a value, you write it as:

     int[4] a;
     a[] = 5;

`int[4] a = 5;` is fine, too.

Reply via email to