如何在CoreCLR和CoreFX中使用System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod?

时间:2016-10-21 08:12:55

标签: c# .net .net-core coreclr

我需要System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod进行预先评估。

但我在CoreFX和CoreCLR中找不到它的参考DLL。

我该如何建造它?什么包有这个类和方法??

1 个答案:

答案 0 :(得分:2)

.Net Core 1.x中不存在

RuntimeHelpers.PrepareMethod(),因此您无法在那里使用它。

该方法已添加到.Net Core 2.0中,但it doesn't do anything there

即将发布的.Net Core 2.1,it will actually compile the given method。 (和only the given method。)

相关问题