>In general I know the answer to the question in the title is no, but considder this case.
>
>The code:
>
>byte[] ba = new byte[24];
>
>creates an array of bytes. Is it safe to assume that all the elements in the byte array are equal to 0x00? I recall from C and unmanaged C++ that is was common to loop through the array after it was declared and initialized and set all the elements to 0x00.
>
>Thanks,
>Einar
By language definition:
"Elements of arrays created by array-creation-expressions are always initialized to their default value".
byte is an integral type with a default value of 0. So yes it's safe to assume all elements eual to 0x00.
Cetin