views:

99

answers:

1

Is it possible to use optional parameters (and other purely-syntactical C# 4.0 features) in Windows Phone XNA applications?

I've read and heard conflicting information about this. In the Advanced Build Settings for my application, the Language Version is set to C# 3.0 (C# 4.0 is not available in the Language Version drop-down list). Is 3.0 the "official" C# version that's going to be used initially for Windows Phone development?

Am I silly for even expecting C# 4.0 features to be available at all?

+2  A: 

Beneath the Silverlight and XNA flair lies some version of the .NET 3.x (3.7?) compact framework. As far behind as Windows Phone 7 is with respect to the rest of the marketplace, this far into the game it's unlikely that a .NET 4.0 compact framework will be inserted (afaik does not yet exist) or any other major architectural changes required to support C# 4.0.

Tim Trout
Thank you. Before I mark your response as the answer, I want to be clear:You're saying that I shouldn't be expecting any of the C# 4.0 features?
Sucralose
Yes, do not expect any 4.0 features in the intial production release.
Tim Trout
I'd rate you up if I could! Thanks.
Sucralose
-1: the language version has little to do with the .NET Framework version. There should be no problem using C# 4.0 and .NET CF 3.whatever together, as long as you're not using the few C# 4.0 features which require Framework support. Optional parameters do not require Framework support.
John Saunders
Some language features, however, most definitely depend on the framework version, for instance the dynamic keyword. My answer is absolutely correct and your -1 vote is unjustified.
Tim Trout