This repository demonstrates using a struct with a parameterless constructor (written in IL) from C#.
It also seves as a quick test that dotnet/runtime#6536 was fixed.
The expected output is:
=====================================================================
Defaulted struct.
Hello, world!
Initialized from parameterless constructor.
Initialized from parameterless constructor.
Initialized from parameterless constructor.
=====================================================================
To build and run the example on Windows, simply run BuildAndRun.cmd
. Currently requires Visual Studio 2019 and .NET 5, but those aren't inherent requirements.
This project is licensed under The Unlicense license. See the license file for details.