UNity 3.2 with MonoDevelop Sync to .NET3.5

Hi all, I was wondering why on Unity 3.2, the default sync to MonoDevelop project is built for Mono .Net 3.5. And i realize that some functionalities not allowed on .NET 2.0 work fine with Unity and UnityWebPlayer.

For instance, something like this is not allowed on .Net 2 :

  1. using (var stringWriter2 = new StringWriter ())  
  2.    using (var xmlTextWriter = XmlWriter.Create (stringWriter2))  

Because the var keyword is on System.Core 3.5 So if i transform my monoproject on .Net 2.0 i can't compile this. But it's perfectly fine with Unity.

I'v got the same problem with C# extension like this :

public static IEnumerable<JToken> Ancestors<T>(this IEnumerable<T> source) where T : JToken

But it's perfectly fine on Unity and UnityWeb Player.

So could someone explain to me why I am able to use some .Net 3+ stuff with Unity, which is supposed to support .Net 2.0 only?


We've had .NET 3.5 support since unity 3.0 - there's no reason to compile down to 2.0 at all anymore