void ThrowIfCannotSerializeReadOnlyTypes(PropertyInfo serializationExceptionMessageProperty)
{
ilg.Load(contextArg);
ilg.LoadMember(XmlFormatGeneratorStatics.SerializeReadOnlyTypesProperty);
ilg.IfNot();
ilg.Load(dataContractArg);
ilg.LoadMember(serializationExceptionMessageProperty);
ilg.Load(null);
ilg.Call(XmlFormatGeneratorStatics.ThrowInvalidDataContractExceptionMethod);
ilg.EndIf();
}