The following code throws a System.Security.VerificationException : Operation could destabilize the runtime.:
public class WithList
{
public WithList(List<int> list)
{
ListOfInt = list;
}
public List<int> ListOfInt { get; }
}
void BlowUp()
{
List<int> list = new List<int>();
var msg = new WithList(list);
new Serialiser<WithList>().Serialise(msg);
}
I'll take a look but you might get there quicker :-)