Каковы правильные номера версий для C#? Что когда вышло? Почему я не могу найти ответы на тему C# 3.5?
Этот вопрос в первую очередь предназначен для тех, кто ищет ответ, используя неправильный номер версии, например C# 3.5. Есть надежда, что любой, кто не сможет найти ответ с неправильным номером версии, найдет вопрос это, а затем снова выполнит поиск с правильным номером версии.
Разве этот второй абзац не должен быть в комментарии вместо вопроса, поскольку он не является частью вопроса
@TankorSmash: Я думаю, что это достаточно важный контекст вопроса, который стоит оставить там, где он есть. ИМО, конечно.
en.wikipedia.org/wiki/C_Sharp_(programming_language)





Самая большая проблема при работе с номерами версий C# заключается в том, что он не привязан к версии .NET Framework, что, по-видимому, связано с синхронизацией выпусков между Visual Studio и .NET Framework.
Версия C# фактически привязана к компилятору, а не к платформе. Например, в Visual Studio 2008 вы можете написать C# 3.0 и использовать .NET Framework 2.0, 3.0 и 3.5. Номенклатура C# 3.0 описывает версию синтаксиса кода и поддерживаемые функции так же, как ANSI C89, C90, C99 описывает синтаксис / функции кода для C.
Взгляните на Мононуклеоз, и вы увидите, что Mono 2.0 (в основном реализованная версия 2.0 .NET Framework из спецификаций ECMA) поддерживает синтаксис и функции C# 3.0.
ВЕРСИЯ_____ ЯЗЫКОВЫЕ ХАРАКТЕРИСТИКИ______MICROSOFT COMPILER
C# 1.0 / 1.2____, декабрь 2001 г., ?, 2003 г., ?, ___________, январь 2002 г., ?.
C# 2.0_______Сентябрь 2005 г.________________, ноябрь 2005 г., ?
C# 3.0_______Май 2006 г._____________________, ноябрь 2006 г., ?
C# 4.0_______Март 2009 г. (проект)______________, апрель 2010 г.?
C# 5.0; выпущен с .NET 4.5 в августе 2012 г.
C# 6.0; выпущен с .NET 4.6 2015
C# 7.0; выпущен с .NET 4.7 2017
C# 8.0; выпущен с .NET 4.8 2019
Откуда вы взяли спецификацию языка C# 2.0 в декабре 2002 г.? Аналогично C# 4 в июне 2006 г.? Вы уверены, что не говорите о редакциях ECMA, которые совершенно разные?
просто обратитесь по следующей ссылке en.wikipedia.org/wiki/C_Sharp_(programming_language)
C# 1.0 с Visual Studio.NET
C# 2.0 с Visual Studio 2005
C# 3.0 с Visual Studio 2008
C# 4.0 с Visual Studio 2010
C# 5.0 с Visual Studio 2012
C# 6.0 с Visual Studio 2015
C# 7.0 с Visual Studio 2017
C# 8.0 с Visual Studio 2019
Сравнивая статьи MSDN «Что нового в языке и компиляторе C# 2.0» и «Что нового в Visual C# 2005», можно сделать вывод, что «C# major_version.minor_version» создан в соответствии с нумерацией версий компилятора.
Есть C# 1.2, соответствующий .NET 1.1 и VS 2003, также называемый Visual C# .NET 2003.
Но в дальнейшем Microsoft прекратила увеличивать номера младших версий (после точки) или делать их отличными от нуля, 0. Хотя следует отметить, что C#, соответствующий .NET 3.5, назван в msdn.microsoft.com как «Пакет обновления 1 для Visual C# 2008».
Существует два параллельных наименования: по основной нумерации версий .NET / компилятора и по нумерации Visual Studio.
C# 2.0 является синонимом Visual C# 2005
C# 3.0 соответствует (или, точнее, может быть ориентирован) на:
Вы можете проверить последние версии C# здесь
Для Visual Basic: en.wikipedia.org/wiki/Visual_Basic_.NET
История версий C#:
C# - это простой и мощный объектно-ориентированный язык программирования, разработанный Microsoft.
C# претерпел значительные изменения со времени своего первого выпуска в 2002 году. C# был представлен вместе с .NET Framework 1.0.
В следующей таблице перечислены важные функции, представленные в каждой версии C#.
А последняя версия C# доступна в Версии C#.
1: 
Это то же самое, что и большинство ответов здесь, но для простоты табулировано, и для полноты у него есть версии Visual Studio и .СЕТЬ.
| Версия C# | Версия VS | Версия .NET | Версия CLR | Дата выпуска |
|---|---|---|---|---|
| 1.0 | 2002 г. | 1.0 | 1.0 | Февраль 2002 г. |
| 1.2 | 2003 г. | 1.1 | 1.1 | Апрель 2003 г. |
| 2.0 | 2005 г. | 2.0 | 2.0 | Ноя 2005 |
| 3.0 | 2.0 | Ноя 2006 | ||
| 3.0 | 2008 г. | 3.5 | 2.0 | Ноя 2007 |
| 4.0 | 2010 г. | 4.0 | 4 | Апрель 2010 г. |
| 5.0 | 2012 г. | 4.5 | 4 | Август 2012 г. |
| 5.0 | 2013 | 4.5.1 | 4 | Октябрь 2013 |
| 4.5.2 | 4 | Май 2014 г. | ||
| 6.0 | 2015 г. | 4.6 | 4 | Июл 2015 |
| 4.6.1 | 4 | Ноя 2015 | ||
| 4.6.2 | 4 | Август 2016 г. | ||
| 7.0 | 2017 г. | Март 2017 г. | ||
| 4,7 | 4 | Май 2017 г. | ||
| 7.1 | 2017 (v15.3) | Август 2017 г. | ||
| 4.7.1 | 4 | Октябрь 2017 | ||
| 7.2 | 2017 (v15.5) | Декабрь 2017 г. | ||
| 4.7.2 | 4 | Апр 2018 | ||
| 7.3 | 2017 (v15.7) | Май 2018 г. | ||
| 8.0 | 2019 г. | 4.8 | 4 | Апрель 2019 |
| 9.0 | 2019 (v16.8) | 5.0 ^ | ^^ | Ноя 2020 |
^ - .NET 5.0 не является более новой версией .NET framework, но .NET Core 3. Начиная с .NET 5.0 нет более новых версий .NET full framework.
^^ - Для .NET Core не существует отдельных версий CLR (CoreCLR). Какой бы ни была версия .NET Core, это версия CoreCLR. Так что не говоря уже об этом.
Примечание:. В наши дни разработка .NET практически не зависит от VS, нет корреляции между версиями каждой из них.
Подробнее см. "Версии и зависимости .NET Framework".
@Dai, мой ответ не подразумевает, что C# 8.0 привязан к .NET 4.8. На самом деле никогда не было требования, чтобы определенные версии компилятора требовали определенных версий .NET абсолютно, за исключением нескольких избранных функций. Так было даже до C# 8.0. Мой ответ просто отслеживает сроки версий VS, .NET и C#. Мой первоначальный ответ был в контексте полной платформы .NET, пока она не прекратила свое существование. Вы можете видеть, что в таблице нет других версий .NET Core, потому что я не приложил усилий, чтобы охватить и это. После вашего редактирования зрители потеряют информацию о .NET 4.8.
Не стесняйтесь добавлять дополнительный столбец для версий .NET Core.
Я обобщил большинство версий в этой таблице. Отсутствуют только версии ASP.NET Core. Я также добавил разные версии ASP.NET MVC.
Обратите внимание, что ASP.NET 5 был переименован в ASP.NET Core 1.0, а ASP.NET MVC 6 был переименован в ASP.NET Core MVC 1.0.0. Я считаю, что это изменение произошло где-то в январе 2016 года.
Я включил дату выпуска ASP.NET 5 RC1 в таблицу, но я еще не включил ASP.NET core 1.0 и другие версии ядра, потому что я не смог найти точные даты выпуска. Вы можете узнать больше о датах выпуска ASP.NET Core здесь: Когда планируется выпуск ASP.NET Core 1.0 (ASP.NET 5 / vNext)?
Я не уверен, что наличие MVC в одной таблице полезно, если честно ... это просто отдельный график выпуска, по сути.
@Jon Это правда, просто добавляю его сюда для тех, кому это может понадобиться, потому что я действительно пытался узнать соответствующие даты выпуска .NET framework, чтобы лучше понять всю историю версий.
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
C# 8.0 - это последняя версия C#. Он поддерживается только в .NET Core 3.x и более новых версиях. Многие из новейших функций требуют функций библиотеки и среды выполнения, представленных в .NET Core 3.x.
В следующей таблице перечислены целевая платформа с версией и их версией C# по умолчанию.
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
Самая последняя версия - 9.0, выпущенная в 2020 году в .NET 5.0 и включенная в Visual Studio 2019 версии 16.8. Mono - это бесплатный проект с открытым исходным кодом для разработки кроссплатформенного компилятора и среды выполнения (то есть виртуальной машины) для языка.
Это один из хороших источников для понимания всего. en.wikipedia.org/wiki/C_Sharp_(programming_language)