.TP
.I "Default"
Instruct compiler to use the latest version. Equivalent is to omit the
-switch (this currently defaults to the C# 3.0 language specification).
+switch (this currently defaults to the C# 4.0 language specification).
.TP
.I "ISO-1"
Restrict compiler to use only first ISO standardized features.
Restrict the compiler to use only the features available in C# 3.0
(a superset of ISO-1 and ISO-2).
.TP
+.I "4"
+Restrict the compiler to use only the features available in C# 4.0
+specification.
+.TP
.I "future"
Enables unstable features from upcoming versions of the language.
.PP
-// CS1617: Invalid -langversion option `ISO'. It must be `ISO-1', `ISO-2', `3' or `Default'
+// CS1617: Invalid -langversion option `ISO'. It must be `ISO-1', `ISO-2', `3', `4', `5', `Default' or `Future'
// Line: 0
// Compiler options: -langversion:ISO
//
// Copyright 2001 Ximian, Inc (http://www.ximian.com)
// Copyright 2004-2008 Novell, Inc
+// Copyright 2011 Xamarin, Inc (http://www.xamarin.com)
+//
using System.Collections.Generic;
using System.IO;
ISO_2 = 2,
V_3 = 3,
V_4 = 4,
+ V_5 = 5,
Future = 100,
Default = LanguageVersion.V_4,
case "3":
settings.Version = LanguageVersion.V_3;
return ParseResult.Success;
+ case "4":
+ settings.Version = LanguageVersion.V_4;
+ return ParseResult.Success;
+ case "5":
+ settings.Version = LanguageVersion.V_5;
+ return ParseResult.Success;
case "future":
settings.Version = LanguageVersion.Future;
return ParseResult.Success;
}
- report.Error (1617, "Invalid -langversion option `{0}'. It must be `ISO-1', `ISO-2', `3' or `Default'", value);
+ report.Error (1617, "Invalid -langversion option `{0}'. It must be `ISO-1', `ISO-2', `3', `4', `5', `Default' or `Future'", value);
return ParseResult.Error;
case "/codepage":
" -help Lists all compiler options (short: -?)\n" +
" -keycontainer:NAME The key pair container used to sign the output assembly\n" +
" -keyfile:FILE The key file used to strongname the ouput assembly\n" +
- " -langversion:TEXT Specifies language version: ISO-1, ISO-2, 3, Default or Future\n" +
+ " -langversion:TEXT Specifies language version: ISO-1, ISO-2, 3, 4, 5, Default or Future\n" +
" -lib:PATH1[,PATHn] Specifies the location of referenced assemblies\n" +
" -main:CLASS Specifies the class with the Main method (short: -m)\n" +
" -noconfig Disables implicitly referenced assemblies\n" +