Skip to content

Instantly share code, notes, and snippets.

@pCYSl5EDgo
Last active March 4, 2019 06:12
Show Gist options
  • Save pCYSl5EDgo/a271e7f713926117989970a6f712dafa to your computer and use it in GitHub Desktop.
Save pCYSl5EDgo/a271e7f713926117989970a6f712dafa to your computer and use it in GitHub Desktop.
.assembly StructInheritance{}
.assembly extern mscorlib{}
// Roslyn interprets A0 as static struct.
.class public auto ansi serializable beforefieldinit A0 extends System.ValueType
{
.method public hidebysig static valuetype A0 GetDefaultA0 () cil managed {
.maxstack 1
.locals init (
[0] valuetype A0
)
ldloca.s 0
initobj A0
ldloc.0
ret
}
}
// Roslyn interprets A1 as class.
.class public auto ansi sealed A1 extends A0
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment