开发者

If I target .NET 2.0, can I still get runtime features from newer versions?

I'm pretty pleased with targeting .NET 2.0 for my XNA games on the basis that it is more widely available (and I can still use nice C# 3.0 language features).

But I recently came across an article saying that the .NET 3.5 SP1 JIT added inlining of value-type methods (something that, as a game developer, I use a lot of).

So my question is this: If my project targets .NET 2.开发者_C百科0, and the user happens to have .NET 3.5 SP1 installed, will my program use the newer JIT?

(And what about the .NET 4.0 JIT and versions beyond that?)


Yes it will use it. The JIT is part of the CLR and .NET 2.0 and 3.5 SP1 use the same version of the CLR. .NET 3.5 SP1 brought improvements to the CLR compared to .NET 2.0 but it stays compatible.

As far as .NET 4.0 and higher is concerned than it is another CLR version that your program won't use.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜