C#の正しいバージョン番号は何ですか?何が出たの?C#3.5に関する回答が見つからないのはなぜですか?
この質問は主に、C#3.5などの誤ったバージョン番号を使用して回答を検索している人を支援するためのものです。間違ったバージョン番号の回答が見つからない場合は、この質問を見つけて、正しいバージョン番号でもう一度検索することをお勧めします。
これらは、この記事の執筆時点で知られているC#のバージョンです。
Dispose
したIEnumerator
sを呼び出す最初のバージョンIDisposable
。他のいくつかの小さな機能。var
)、クエリ式dynamic
)、デリゲートとインターフェイスのジェネリック分散、より多くのCOMサポート、名前付き引数、タプルデータ型、オプションのパラメーターawait
incatch
およびfinally
、Add
コレクション初期化子の拡張メソッドをインポートします。out
パラメーター宣言、ローカル関数、バイナリリテラル、桁区切り文字、および任意の非同期戻り値。unmanaged
型、デリゲート型、ジェネリック型の制約。ref
再割り当て。安全でない改善:stackalloc
初期化、固定されていないインデックス付きfixed
バッファー、カスタムfixed
ステートメント。オーバーロードの解決が改善されました。イニシャライザとクエリの式変数。==
そして!=
タプルに対して定義されました。自動プロパティのバッキングフィールドを属性のターゲットにできるようになりました。new
式、型指定されたターゲット??
と?
)、共変量が返されます。マイナー特徴:の順序リラックスref
とpartial
修飾子を、パラメータはnullチェック、ラムダ廃棄パラメータ、ネイティブint
のは、ローカル関数、関数ポインタ、静的のラムダ、拡張子の属性GetEnumerator
部分拡張、モジュール初期化子。C#の正しいバージョン番号は何ですか?何が出たの?C#3.5に関する回答が見つからないのはなぜですか?
C#3.5のようなものはありません-ここでの混乱の原因は、C#3.0が.NET3.5に存在することです。ただし、言語とフレームワークは個別にバージョン管理されます。CLRは、.NET 2.0から3.5のバージョン2.0であり、.NET4はCLR4.0を導入していますが、サービスパックも同様です。.NET 4.5のCLRにはさまざまな改善がありますが、バージョン管理は不明確です。一部の場所ではCLR 4.5と呼ばれることがあります(たとえば、このMSDNページではそのように参照されていました)が、Environment.Version
プロパティは4.0を報告します。 xxx。
2017年5月3日の時点で、C#言語チームはGitHubリポジトリにC#バージョンと機能の履歴を作成しました:C#言語バージョンで追加された機能。今後および最近実装された言語機能を追跡するページもあります。
これは、ここで最も答えと同じですが、簡単にするためにテーブル化し、それが持っているのVisual Studioと.NETの完全性についてのバージョンを。
╔════════════╦════════════╦══════════════╦═════════════╦══════════════╗
║ C# version ║ VS version ║ .NET version ║ CLR version ║ Release date ║
╠════════════╬════════════╬══════════════╬═════════════╬══════════════╣
║ 1.0 ║ 2002 ║ 1.0 ║ 1.0 ║ Feb 2002 ║
║ 1.2 ║ 2003 ║ 1.1 ║ 1.1 ║ Apr 2003 ║
║ 2.0 ║ 2005 ║ 2.0 ║ 2.0 ║ Nov 2005 ║
║ ║ ║ 3.0 ║ 2.0 ║ Nov 2006 ║
║ 3.0 ║ 2008 ║ 3.5 ║ 2.0 ║ Nov 2007 ║
║ 4.0 ║ 2010 ║ 4.0 ║ 4 ║ Apr 2010 ║
║ 5.0 ║ 2012 ║ 4.5 ║ 4 ║ Aug 2012 ║
║ 5.0 ║ 2013 ║ 4.5.1 ║ 4 ║ Oct 2013 ║
║ ║ ║ 4.5.2 ║ 4 ║ May 2014 ║
║ 6.0 ║ 2015 ║ 4.6 ║ 4 ║ Jul 2015 ║
║ ║ ║ 4.6.1 ║ 4 ║ Nov 2015 ║
║ ║ ║ 4.6.2 ║ 4 ║ Aug 2016 ║
║ 7.0 ║ 2017 ║ ║ ║ Mar 2017 ║
║ ║ ║ 4.7 ║ 4 ║ May 2017 ║
║ 7.1 ║ 2017(v15.3)║ ║ ║ Aug 2017 ║
║ ║ ║ 4.7.1 ║ 4 ║ Oct 2017 ║
║ 7.2 ║ 2017(v15.5)║ ║ ║ Dec 2017 ║
║ ║ ║ 4.7.2 ║ 4 ║ Apr 2018 ║
║ 7.3 ║ 2017(v15.7)║ ║ ║ May 2018 ║
║ 8.0 ║ 2019 ║ 4.8 ║ 4 ║ Apr 2019 ║
║ 9.0 ║ 2019(v16.8)║ 5.0^ ║ ^^ ║ Nov 2020 ║
╚════════════╩════════════╩══════════════╩═════════════╩══════════════╝
^-。NET 5.0は、.NET Frameworkの新しいバージョンではなく、.NET Core 3です。.NET5.0以降、.NETフルフレームワークの新しいバージョンはありません。
^^- 。NET Core用の個別のCLR(CoreCLR)バージョンはありません。.NET Coreバージョンは、CoreCLRバージョンです。だからそれについては言及しない。
注:最近の.NET開発はVSからほとんど独立しており、それぞれのバージョン間に相関関係はありません。
詳細については、「。NETFrameworkのバージョンと依存関係」を参照してください。
C#のバージョン番号を処理する際の最大の問題は、.NET Frameworkのバージョンに関連付けられていないという事実です。これは、VisualStudioと.NETFrameworkの間で同期されたリリースが原因であると思われます。
C#のバージョンは、実際にはフレームワークではなくコンパイラにバインドされています。たとえば、Visual Studio 2008では、C#3.0を記述し、.NET Framework 2.0、3.0、および3.5をターゲットにすることができます。C#3.0の命名法は、ANSI C89、C90、C99がCのコード構文/機能を説明するのと同じ方法で、コード構文のバージョンとサポートされる機能を説明します。
見てくださいモノを、あなたはモノ2.0(ほとんどECMA仕様からの.NET Frameworkのバージョン2.0を実装)ことがわかりますC#3.0の構文と機能をサポートしています。
Visual Studio.NETを使用したC#1.0
Visual Studio 2005を使用したC#2.0
Visual Studio 2008を使用したC#3.0
Visual Studio 2010を使用したC#4.0
Visual Studio 2012を使用したC#5.0
Visual Studio 2015を使用したC#6.0
Visual Studio 2017でのC#7.0
Visual Studio 2019を使用したC#8.0
バージョン_____
言語仕様______
MICROSOFTCOMPILER
C#1.0 / 1.2____
2001年12月?/ 2003 ?___________
2002年1月?
C#2.0 _______
2005年9月2005年________________
11月?
C#3.0 _______
2006年5月2006年_____________________
11月?
C#4.0 _______
2009年3月(ドラフト)______________
2010年4月?
C#5.0; 2012年8月に.NET4.5でリリース
C#6.0; .NET 4.62015でリリース
C#7.0; .NET 4.72017でリリース
C#8.0; .NET 4.82019でリリース
C#バージョン履歴:
C#は、Microsoftによって開発されたシンプルで強力なオブジェクト指向プログラミング言語です。
C#は、2002年の最初のリリース以来、大きく進化しました。C#は.NET Framework1.0で導入されました。
次の表に、C#の各バージョンで導入された重要な機能を示します。
そして、C#の最新バージョンが利用可能であるC#のバージョン。
1:
この表のほとんどのバージョンを要約しました。欠落しているのはASP.NETCoreバージョンのみです。また、ASP.NETMVCのさまざまなバージョンを追加しました。
ASP.NET5はASP.NETCore 1.0としてブランド変更され、ASP.NET MVC6はASP.NETCore MVC1.0.0としてブランド変更されていることに注意してください。この変更は2016年1月頃に発生したと思います。
表にASP.NET5 RC1のリリース日を含めましたが、正確なリリース日が見つからなかったため、ASP.NET Core1.0およびその他のコアバージョンはまだ含めていません。ASP.NET Coreに関するリリース日について詳しくは、こちらをご覧ください:ASP.NET Core 1.0(ASP.NET 5 / vNext)のリリースはいつ予定されていますか?
ここで最新のC#バージョンを確認できます
MSDNの記事「C#2.0言語とコンパイラの新機能」と「VisualC#2005の新機能」を比較すると、「C#major_version.minor_version」はコンパイラのバージョン番号に従って作成されていると推測できます。
.NET1.1およびVS2003に対応するC#1.2があり、Visual C#.NET2003とも呼ばれます。
しかし、さらにMicrosoftは、マイナーバージョン(ドットの後)の番号をインクリメントするか、ゼロ以外にすることをやめました0
。ただし、.NET 3.5に対応するC#は、msdn.microsoft.comでは「VisualC#2008 ServicePack1 」という名前が付けられていることに注意してください。
並列の名前は2つあります。メジャーな.NET /コンパイラのバージョン番号とVisualStudioの番号です。
C#2.0は、Visual C#2005の同義語です。
C#3.0は、以下に対応します(より正確には、ターゲットにできます)。
Classes
Structs
Interfaces
Events
Properties
Delegates
Expressions
Statements
Attributes
Literals
Dispose in foreach
foreach over string specialization
C# 2 - Visual Studio 2005
Generics
Partial types
Anonymous methods
Iterators
Nullable types
Getter/setter separate accessibility
Method group conversions (delegates)
Static classes
Delegate inference
Implicitly typed local variables
Object and collection initializers
Auto-Implemented properties
Anonymous types
Extension methods
Query expressions
Lambda expression
Expression trees
Partial methods
Dynamic binding
Named and optional arguments
Co- and Contra-variance for generic delegates and interfaces
Embedded interop types ("NoPIA")
Asynchronous methods
Caller info attributes
Draft Specification online
Compiler-as-a-service (Roslyn)
Import of static type members into namespace
Exception filters
Await in catch/finally blocks
Auto property initializers
Default values for getter-only properties
Expression-bodied members
Null propagator (null-conditional operator, succinct null checking)
String interpolation
nameof operator
Dictionary initializer
Out variables
Pattern matching
Tuples
Deconstruction
Discards
Local Functions
Binary Literals
Digit Separators
Ref returns and locals
Generalized async return types
More expression-bodied members
Throw expressions
Async main
Default expressions
Reference assemblies
Inferred tuple element names
Pattern-matching with generics
Span and ref-like types
In parameters and readonly references
Ref conditional
Non-trailing named arguments
Private protected accessibility
Digit separator after base specifier
System.Enum, System.Delegate and unmanaged constraints.
Ref local re-assignment: Ref locals and ref parameters can now be reassigned with the ref assignment operator (= ref).
Stackalloc initializers: Stack-allocated arrays can now be initialized, e.g. Span<int> x = stackalloc[] { 1, 2, 3 };.
Indexing movable fixed buffers: Fixed buffers can be indexed into without first being pinned.
Custom fixed statement: Types that implement a suitable GetPinnableReference can be used in a fixed statement.
Improved overload candidates: Some overload resolution candidates can be ruled out early, thus reducing ambiguities.
Expression variables in initializers and queries: Expression variables like out var and pattern variables are allowed in field initializers, constructor initializers and LINQ queries.
Tuple comparison: Tuples can now be compared with == and !=.
Attributes on backing fields: Allows [field: …] attributes on an auto-implemented property to target its backing field.
Nullable reference types: express nullability intent on reference types with ?, notnull constraint and annotations attributes in APIs, the compiler will use those to try and detect possible null values being dereferenced or passed to unsuitable APIs.
Default interface members: interfaces can now have members with default implementations, as well as static/private/protected/internal members except for state (ie. no fields).
Recursive patterns: positional and property patterns allow testing deeper into an object, and switch expressions allow for testing multiple patterns and producing corresponding results in a compact fashion.
Async streams: await foreach and await using allow for asynchronous enumeration and disposal of IAsyncEnumerable<T> collections and IAsyncDisposable resources, and async-iterator methods allow convenient implementation of such asynchronous streams.
Enhanced using: a using declaration is added with an implicit scope and using statements and declarations allow disposal of ref structs using a pattern.
Ranges and indexes: the i..j syntax allows constructing System.Range instances, the ^k syntax allows constructing System.Index instances, and those can be used to index/slice collections.
Null-coalescing assignment: ??= allows conditionally assigning when the value is null.
Static local functions: local functions modified with static cannot capture this or local variables, and local function parameters now shadow locals in parent scopes.
Unmanaged generic structs: generic struct types that only have unmanaged fields are now considered unmanaged (ie. they satisfy the unmanaged constraint).
Readonly members: individual members can now be marked as readonly to indicate and enforce that they do not modify instance state.
Stackalloc in nested contexts: stackalloc expressions are now allowed in more expression contexts.
Alternative interpolated verbatim strings: @$"..." strings are recognized as interpolated verbatim strings just like $@"...".
Obsolete on property accessors: property accessors can now be individually marked as obsolete.
Permit t is null on unconstrained type parameter
[ソース]: https://github.com/dotnet/csharplang/blob/master/Language-Version-History.md
Version .NET Framework Visual Studio Important Features
C# 1.0 .NET Framework 1.0/1.1 Visual Studio .NET 2002
Basic features
C# 2.0 .NET Framework 2.0 Visual Studio 2005
Generics
Partial types
Anonymous methods
Iterators
Nullable types
Private setters (properties)
Method group conversions (delegates)
Covariance and Contra-variance
Static classes
C# 3.0 .NET Framework 3.0\3.5 Visual Studio 2008
Implicitly typed local variables
Object and collection initializers
Auto-Implemented properties
Anonymous types
Extension methods
Query expressions
Lambda expressions
Expression trees
Partial Methods
C# 4.0 .NET Framework 4.0 Visual Studio 2010
Dynamic binding (late binding)
Named and optional arguments
Generic co- and contravariance
Embedded interop types
C# 5.0 .NET Framework 4.5 Visual Studio 2012/2013
Async features
Caller information
C# 6.0 .NET Framework 4.6 Visual Studio 2013/2015
Expression Bodied Methods
Auto-property initializer
nameof Expression
Primary constructor
Await in catch block
Exception Filter
String Interpolation
C# 7.0 .NET Core 2.0 Visual Studio 2017
out variables
Tuples
Discards
Pattern Matching
Local functions
Generalized async return types
Numeric literal syntax improvements
C# 8.0 .NET Core 3.0 Visual Studio 2019
Readonly members
Default interface methods
Pattern matching enhancements:
Switch expressions
Property patterns
Tuple patterns
Positional patterns
Using declarations
Static local functions
Disposable ref structs
Nullable reference types
Asynchronous streams
Asynchronous disposable
Indices and ranges
Null-coalescing assignment
Unmanaged constructed types
Stackalloc in nested expressions
Enhancement of interpolated verbatim strings
C#8.0はc#の最新バージョンです。これは、.NET Core3.x以降のバージョンでのみサポートされています。最新の機能の多くには、.NET Core3.xで導入されたライブラリおよびランタイム機能が必要です。
次の表に、ターゲットフレームワークとそのバージョンおよびデフォルトのC#バージョンを示します。
ソース-C#言語のバージョン管理
特徴的なスターのコリン・エッグレスフィールドは、RomaDrama Liveでのスリル満点のファンとの出会いについて料理しました!加えて、大会での彼のINSPIREプログラム。
ノーザンエクスポージャーが90年代の最も人気のある番組の1つになった理由を確認するには、Blu-rayまたはDVDプレーヤーをほこりで払う必要があります。
ドミニカのボイリング湖は、世界で2番目に大きいボイリング湖です。そこにたどり着くまでのトレッキングは大変で長いですが、努力する価値は十分にあります。
ジョー・バロウロー対ウェイド事件の転覆に対応するNFLは、言葉を言わないことで、腹立たしいが予測可能なPRの結果でした。
(lから)パット・ペレス、ブルックス・ケプカ、パトリック・リードサウジアラビアのLIVゴルフリーグのさらに別の信じられないほどの記者会見で、スポーツのファンはブルックス・ケプカからでたらめな吐き気と質問回避の驚異的なマスタークラスを受けました。パトリックリード、ブライソンデシャンボー、パットペレス、最近のPGAツアーの脱北者。
暗号業界最大の沈没船の1つであるスリーアローズキャピタルは、ついにその悲惨さから解放されています。火曜日に、不良債権ヘッジファンドは、債権者からの返済を要求する訴訟の高まりに応えて、バージンアイランド裁判所によって清算を命じられました彼らが3ACに行ったローン。
Zendaya shared a sweet photo in honor of boyfriend Tom Holland's 26th birthday Wednesday
シーレン「Ms.JuicyBaby」ピアソンは、先月脳卒中で入院した後、「もう一度たくさんのことをする方法を学ばなければならない」ため、言語療法を受けていることを明らかにしました。
オスカー受賞者の世紀半ばの家には、3つのベッドルーム、2つのバス、オーシャンフロントの景色があります。
Mais um mês se findando — e metade do ano de 2022 já passou. Sabe o que isso significa? Não, não é hora de verificar se você está cumprindo com suas resoluções de Ano Novo.
1.ドラマを見た後、起業する考えはありますか?あなたのビジネスはボトルネックに遭遇しましたか?方向性がなくてわからない場合は、ドラマを追いかけて行くことを心からお勧めします。(?)ブラフではなく、最も完璧なビジネス例を隠すドラマがあります。2.ブレイキング・バッドとその弁護士ドラマ「ブレイキング・バッド」を見た友人たちは、演劇の中で、穏やかな表情で、弁護士のソウル・グッドマンに深く感銘を受けなければなりません。口を開けて、感覚の弱い傭兵の性格を持っています。道徳の面で、サル・グッドマンは無意識のうちに劇に欠かせない役割を果たし、彼自身のシリーズ「絶望的な弁護士」(ベター・コール・ソール)を生み出しました。ウェントウのテキストとビデオは、劇中のソウル・グッドマンのテレビコマーシャルです。製品(サービス)、競争戦略、市場ポジショニング、ブランド名、ターゲット顧客グループ、コミュニケーション軸から広告まで、サル・グッドマンの役割のビジネス設定は、「最低」と見なすことができる超超超超超超完全です。ブランドコミュニケーションのコスト」「変化」のモデル。なぜ?私の分析をご覧ください。3.ソウル・グッドマンの「事業戦略」1.基本情報ブランド名:Saul Goodman製品:法律相談サービス対象顧客:麻薬中毒、飲酒運転、事故など。法律知識の欠如は、一般的に公立弁護士にしか余裕がなく、真面目な弁護士も「特別な法律を持つ消費者」を避けます。恐れてはいけない「ニーズ」。コミュニケーションの主軸:この国のすべての男性、女性、子供は有罪判決を受けるまで無実だと思います。地域:アルバカーキ市スローガン:Thrallに電話したほうがいいです!(ベター・コール・ソール)広告:2つの可能性のある犯罪状況をシミュレートします+サウルの主張+サウルのスローガン2をより適切に呼び出します。