views:

32

answers:

1

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.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?)

+2  A: 

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.

Darin Dimitrov