Change in behavior WRT initonly fields #66911
Unanswered
TahirAhmadov
asked this question in
General
Replies: 1 comment 2 replies
-
.NET Core does not (and has never) performed IL verification under any circumstances. It is expected that unverifiable IL will compile and run without issue. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In .NET 4.8, setting a
readonly
(initonly) field in a method other than the ctor causedVerificationException
(say, when you use IL emit). In .NET 6, it succeeds and the value is set. Is that an expected change?Beta Was this translation helpful? Give feedback.
All reactions