Changed behavior of string.Empty (or System.String::Empty) in .NET 4.5

The difference lies in the JIT for the new release of .NET, which apparently optimizes references to String.Empty by inlining a reference to a particular String instance rather than load the value stored in the Empty field. This is justified under the definition of the init-only constraint in ECMA-335 Partition I ยง8.6.1.2, which can be interpreted to mean the value of the String.Empty field will not change after the String class is initialized.

Leave a Comment

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