mirror of https://github.com/icsharpcode/ILSpy.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
435 B
21 lines
435 B
using System; |
|
using System.Runtime.InteropServices; |
|
internal class EvalOrder |
|
{ |
|
private SimpleStruct field; |
|
|
|
public static void Test(EvalOrder p) |
|
{ |
|
// ldflda (and potential NRE) before MyStruct ctor call |
|
ref SimpleStruct reference = ref p.field; |
|
reference = new SimpleStruct(1); |
|
} |
|
} |
|
[StructLayout(LayoutKind.Sequential, Size = 1)] |
|
internal struct SimpleStruct |
|
{ |
|
public SimpleStruct(int val) |
|
{ |
|
Console.WriteLine(val); |
|
} |
|
}
|
|
|