Jakie są poprawne numery wersji C#?
Jakie są poprawne numery wersji C#? Co wyszło kiedy? Dlaczego nie mogę znaleźć żadnych odpowiedzi na temat C# 3.5?
To pytanie ma przede wszystkim pomóc tym, którzy szukają odpowiedzi używając błędnego numeru wersji, np. C# 3.5. Nadzieja jest taka, że każdy, kto nie znajdzie odpowiedzi z błędnym numerem wersji, znajdzie to pytanie , a następnie ponownie wyszukuje właściwy numer wersji.
12 answers
Historia wersji językowej C#:
Oto wersje C# znane w momencie pisania tego tekstu:
- W 2002 roku, w 2004 roku, w 2005 roku, w 2006 roku, w 2008 roku, w 2009 roku, w 2009 roku, w 2009 roku, w 2009 roku, w 2009 roku, w 2009 roku, w 2009 roku]}
-
C # 1.2 (dość dziwne); wydany z. NET 1.1 i VS2003 (kwiecień 2003). Pierwsza wersja wywołująca
Dispose
naIEnumerator
s, która zaimplementowałaIDisposable
. Kilka innych małych funkcji. - [[33]}C# 2.0 wydany z.NET 2.0 i VS2005 (listopad 2005). Major nowe funkcje: generyki, metody anonimowe, typy nullable, bloki iteratora
-
[[33]}C# 3.0 wydany z.NET 3.5 i VS2008 (listopad 2007). Główne nowe funkcje: wyrażenia lambda, metody rozszerzeń, drzewa wyrażeń, typy anonimowe, niejawne typowanie (
var
), wyrażenia zapytań ([35]} -
[[33]}C# 4.0 wydany z.Net 4 i VS2010 (kwiecień 2010). Główne nowe funkcje: późne wiązanie (
dynamic
), zmienność generyczna delegatów i interfejsów, więcej wsparcia COM, nazwane argumenty, krotka typ danych i opcjonalne parametry - [[33]}C# 5.0 wydany z.NET 4.5 i VS2012 (sierpień 2012). Główne cechy : programowanie asynchroniczne, atrybuty informacji o rozmówcy. Przerywanie zmiany: zamknięcie zmiennej pętli .
-
[[33]}C# 6.0 wydany z.NET 4.6 i VS2015 (lipiec 2015). Zaimplementowany przez Roslyn . Features : inicjalizatory Dla automatycznie zaimplementowanych właściwości, używając dyrektyw do importowania statycznych członków, filtrów WYJĄTKÓW, elementu initializers,
await
incatch
andfinally
, extensionAdd
methods in collection initializers. -
[[33]}C# 7.0 wydany z.NET 4.7 i VS2017 (Marzec 2017). Główne nowe funkcje: krotki, ref i ref return, pattern matching (w tym instrukcje przełączania oparte na wzorcach), inline
out
deklaracje parametrów, funkcje Lokalne, literały binarne, separatory cyfr i dowolne asynchroniczne zwraca . - C# 7.1 wydany z VS2017 v15. 3 (Sierpień 2017) Nowe funkcje: async main, wnioskowanie o nazwie członka tuple, domyślne wyrażenie, dopasowanie wzorca do generyków .
-
C# 7.2 wydany z VS2017 v15 .5 (Listopad 2017) Nowe funkcje: modyfikator private protected access, Span
, aka interior pointer, aka stackonly struct , Wszystko inne . -
C# 7.3 wydany w wersji VS2017 v15 .7 (Maj 2018). Nowe funkcje: enum, delegate i
unmanaged
ograniczenia typów ogólnych .ref
zmiana przydziału. Niebezpieczne ulepszenia: inicjalizacjastackalloc
, bezindeksowane buforyfixed
, niestandardowe instrukcjefixed
. Poprawiono rozdzielczość przeciążenia. Zmienne wyrażenia w inicjalizatorach i zapytaniach.==
i!=
zdefiniowane dla krotek. Pola pomocnicze Auto-właściwości mogą być teraz kierowane przez atrybuty. - C# 8.0 wydany z. Net Core 3.0 i VS2019 v16 .3 (wrzesień 2019). Główne nowe funkcje: nullable reference-types, strumienie asynchroniczne, Indeksy i zakresy, członkowie Readonly, korzystanie z deklaracji,domyślne metody interfejsu, Static local functions i Enhancement of interpolated verbatim strings .
-
W 2018 roku, w ramach projektu, wprowadzono do użytku nową wersję C# 9.0, która została wprowadzona do użytku w 2019 roku. Major nowe funkcje: właściwości tylko init, rekordy, with-expressions , klasy danych, rekordy pozycyjne, programy najwyższego poziomu, ulepszone dopasowywanie wzorców (proste wzorce typu, wzorce relacyjne, wzorce logiczne), ulepszone typowanie docelowe (wyrażenia typu docelowego
new
, typowane docelowo??
i?
), zwroty kowariantne. Minor features: relax ordering ofref
andpartial
modifiers, parameter null checking, lambda discard parametry, natywneint
s, atrybuty funkcji lokalnych, Wskaźniki funkcji, statyczne lambdy, rozszerzeniaGetEnumerator
, inicjalizatory modułów, częściowe Rozszerzanie.
W odpowiedzi na pytanie OP:
Jakie są poprawne numery wersji C#? Co wyszło kiedy? Dlaczego nie mogę znaleźć odpowiedzi na temat C # 3.5?
Nie ma czegoś takiego jak C# 3.5 - przyczyną zamieszania jest to, że C # 3.0 jest obecny w.NET 3.5. Język i ramy są niezależnie od wersji-podobnie jak CLR, który jest w wersji 2.0 Dla. NET 2.0 do 3.5,. NET 4.0 do CLR 4.0, bez względu na dodatki service Pack. CLR w. NET 4.5 ma różne ulepszenia, ale wersjonowanie jest niejasne: w niektórych miejscach może być określane jako CLR 4.5 (ta strona MSDN używana do tego, na przykład, w ten sposób), ale Environment.Version
property still reports 4.0.xxx.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2020-11-13 19:27:01
Jest to to samo, co większość odpowiedzi tutaj, ale tabelaryczne dla ułatwienia, i ma wersje Visual Studio i . NET dla kompletności.
Wersja C# | VS Wersja | . NET version | Wersja CLR | Data premiery |
---|---|---|---|---|
1.0 | 2002 | 1.0 | 1.0 | luty 2002 |
1.2 | 2003 | 1.1 | 1.1 | Kwiecień 2003 |
2.0 | 2005 | 2.0 | 2.0 | listopad 2005 |
3.0 | 2.0 | listopad 2006 | ||
3.0 | 2008 | 3.5 | 2.0 | listopad 2007 |
4.0 | 2010 | 4.0 | 4 | Apr 2010 |
5.0 | 2012 | 4.5 | 4 | Sierpień 2012 |
5.0 | 2013 | 4.5.1 | 4 | Październik 2013 |
4.5.2 | 4 | Maj 2014 | ||
6.0 | 2015 | 4.6 | 4 | Lipiec 2015 |
4.6.1 | 4 | Listopad 2015 | ||
4.6.2 | 4 | Sierpień 2016 | ||
7.0 | 2017 | marzec 2017 | ||
4.7 | 4 | Maj 2017 | ||
7.1 | 2017 (v15.3) | Sierpień 2017 | ||
4.7.1 | 4 | Październik 2017 | ||
7.2 | 2017 (v15.5) | Grudzień 2017 | ||
4.7.2 | 4 | kwiecień 2018 | ||
7.3 | 2017 (v15.7) | Maj 2018 | ||
8.0 | 2019 | 4.8 | 4 | [23]} Kwiecień 2019|
9.0 | 2019 (v16.8)5.0^ | ^^ | Listopad 2020 |
^ -. NET 5.0 nie jest nowszą wersją. NET framework, ale. NET Rdzeń 3. Począwszy od. NET 5.0, nie ma nowszych wersji. NET full framework.
^^ - nie ma osobnych wersji CLR (CoreCLR) dla.NET Core. cokolwiek jest wersją. NET Core jest wersją CoreCLR. Nie wspominając o tym.
Uwaga: rozwój. NET jest prawie niezależny od VS w dzisiejszych czasach, nie ma korelacji między wersjami każdej z nich. Więcej informacji można znaleźć w sekcji " . NET Framework versions and dependencies".
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2020-12-09 12:47:40
Największym problemem w przypadku numerów wersji C#jest fakt, że nie jest on związany z wersją. NET Framework, co wydaje się być spowodowane zsynchronizowanymi wydaniami między Visual Studio i.NET Framework.
Wersja C# jest w rzeczywistości związana z kompilatorem, a nie z frameworkiem. Na przykład w Visual Studio 2008 można napisać C # 3.0 i docelowy. NET Framework 2.0, 3.0 i 3.5. Nomenklatura C # 3.0 opisuje wersję składni kodu i wspiera funkcje w taki sam sposób jak ANSI C89, C90, C99 opisują składnię kodu / funkcje dla C.
Spójrz na Mono, a zobaczysz, że Mono 2.0 (głównie zaimplementowana Wersja 2.0.NET Framework ze specyfikacji ECMA) obsługuje składnię i funkcje C# 3.0.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2017-11-06 17:19:06
-
C # 1.0 with Visual Studio.NET
-
C # 2.0 with Visual Studio 2005
-
C# 3.0 with Visual Studio 2008
-
C# 4.0 z Visual Studio 2010
-
C # 5.0 z Visual Studio 2012
-
C # 6.0 z Visual Studio 2015
-
C # 7.0 z Visual Studio 2017
C # 8.0 z Visual Studio 2019
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2020-02-12 14:52:25
WERSJA_____
SPECYFIKACJA JĘZYKA______
KOMPILATOR MICROSOFT
C# 1.0/1.2____
Grudzień 2001 ?/2003?___________
styczeń 2002 ?
C# 2.0_______
Wrzesień 2005________________
Listopad 2005 ?
C# 3.0_______
Maj 2006_____________________
Listopad 2006 ?
C# 4.0_______
marzec 2009 (projekt)______________
Kwiecień 2010 ?
C # 5.0; wydany z. NET 4.5 W Sierpień 2012
[10]} C # 6.0; wydany z. NET 4.6 2015 [10]} C # 7.0; wydany z. NET 4.7 2017 [10]}C# 8.0; wydany z. NET 4.8 2019Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2020-02-13 12:36:56
Historia Wersji C#:
C # to prosty i wydajny obiektowo zorientowany język programowania opracowany przez firmę Microsoft.
C# ewoluował znacznie od pierwszego wydania w 2002 roku. C# został wprowadzony wraz z. NET Framework 1.0.
Poniższa tabela zawiera ważne funkcje wprowadzone w każdej wersji C#.
A najnowsza wersja C# jest dostępna w wersje C# .
1:
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2020-03-16 07:46:04
Podsumowałem większość wersji w tej tabeli. Brakuje tylko ASP.NET wersje podstawowe. Dodałem również różne wersje ASP.NET MVC.
Zauważ, że ASP.NET 5 został przemianowany na ASP.NET Core 1.0 i ASP.NET MVC 6 został przemianowany na ASP.NET Core MVC 1.0.0. Wierzę, że ta zmiana nastąpiła gdzieś około stycznia 2016.
Podałem datę premiery ASP.NET 5 RC1 w tabeli, ale jeszcze nie uwzględniłem ASP.NET core 1.0 i inne wersje core, ponieważ nie mogłem znaleźć dokładnych dat wydania. Więcej o datach premiery można przeczytać w ASP.NET Rdzeń tutaj: Kiedy jest ASP.NET Core 1.0 (ASP.NET 5 / vNext) planowana premiera?
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2017-11-06 17:31:23
Możesz sprawdzić najnowsze wersje C# tutaj
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2014-10-30 19:58:33
Porównując artykuły MSDN "Co nowego w języku C# 2.0 i kompilatorze" i "Co nowego w Visual C# 2005", można wywnioskować, że "C# major_version.minor_version " jest ukuty zgodnie z numeracją wersji kompilatora.
[1]}Istnieje C# 1.2 odpowiadający.NET 1.1 I VS 2003, a także nazwany Visual C#. Net 2003.Ale dalej Microsoft zatrzymał się, aby zwiększyć wersję podrzędną (po kropce) numery lub mieć inne niż zero, 0
. Należy jednak zauważyć, że C# odpowiadający. NET 3.5 jest nazwany w msdn.microsoft.com jako "Visual C# 2008 Service Pack 1" .
Istnieją dwie równoległe nazwy: według numeracji wersji. NET/kompilatora oraz numeracji Visual Studio.
C # 2.0 jest synonimem Visual C# 2005
C # 3.0 odpowiada (lub, bardziej poprawnie, może kierować) do:
- . NET 2.0 Visual C# 2005
- .NET3. 0 Visual C # 2008
- . NET 3.5 Visual C # 2008 Service Pack 1
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2017-11-06 17:22:41
C # 1.0-Visual Studio. NET 2002
Classes
Structs
Interfaces
Events
Properties
Delegates
Expressions
Statements
Attributes
Literals
C # 1.2-Visual Studio. NET 2003
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
C # 3-Visual Studio 2008
Implicitly typed local variables
Object and collection initializers
Auto-Implemented properties
Anonymous types
Extension methods
Query expressions
Lambda expression
Expression trees
Partial methods
C # 4-Visual Studio 2010
Dynamic binding
Named and optional arguments
Co- and Contra-variance for generic delegates and interfaces
Embedded interop types ("NoPIA")
C # 5-Visual Studio 2012
Asynchronous methods
Caller info attributes
C # 6-Visual Studio 2015
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
C# 7.0 - Visual Studio 2017
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
C# 7.1 - Visual Studio 2017 Wersja 15.3
Async main
Default expressions
Reference assemblies
Inferred tuple element names
Pattern-matching with generics
C# 7.2 - Visual Studio 2017 Wersja 15.5
Span and ref-like types
In parameters and readonly references
Ref conditional
Non-trailing named arguments
Private protected accessibility
Digit separator after base specifier
C # 7.3-Visual Studio 2017 Wersja 15.7
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.
C # 8.0 -. NET Core 3.0 i Visual Studio 2019 wersja 16.3
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
[źródło] : https://github.com/dotnet/csharplang/blob/master/Language-Version-History.md
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2019-11-24 22:12:41
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
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2020-08-08 15:01:04
C # 8.0 to najnowsza wersja c#.it jest obsługiwana tylko na. Net Core 3.X i nowsze wersje. Wiele najnowszych funkcji wymaga bibliotek i funkcji runtime wprowadzonych w. NET Core 3.x
Poniższa tabela zawiera listę docelowego frameworka z wersją i ich domyślną wersją C#.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2020-03-02 11:48:35