What is a verifiable type in C#?
I am reading the CLR via C# book. And I come across the following piece of knowledge data:
It should be noted that it is illegal to define a type in which a reference type and a value type overlap. It is possible to define a type in which multiple reference types overlap at the same starting offset; however, this is unverifiable. It is legal to define a type in which multiple value types overlap; however, all of the overlapping bytes must be accessible via public fields for the type to be verifiable.
The piece is related to the System.Runtime.InteropServices.StructLayoutAttribute
attribute and the System.Runtime.InteropServices.FieldOffsetAttribute
attribute. It is about the Layout of a Type’s Fields.
I can not find on the internet the definition of a verifiable type, are there any?
UPDATE
In the comments section below the following question was pointed out: this.
So, according to the answer I assume that a type is verifiable if any manipulations with the fields and the methods of the type do not break the CLR functionality. It is a roughly speaking definition, but is it correct?