Why do these two comparisons have different results?

Because new Byte() creates value type, which are compared by value (by default it will return byte with value 0). And new Byte[0] creates array, which is a reference type and compared by reference (and these two instances of array will have different references).

See Value Types and Reference Types article for details.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)