An observation, but DotPeek shows the decompiled string.Empty thus:
///
/// Represents the empty string. This field is read-only.
///
/// 1
[__DynamicallyInvokable]
public static readonly string Empty;
internal sealed class __DynamicallyInvokableAttribute : Attribute
{
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public __DynamicallyInvokableAttribute()
{
}
}
If I declare my own Empty the same way except without the attribute, I no longer get the MDA:
class A
{
static readonly string Empty;
static A() { }
public A()
{
string.Format("{0}", Empty);
}
}