What is the correct way to call C # versions?

16

There seems to be some confusion with the naming of the C # versions and the technologies that are related to it.

Is there a C # 2005? Or a C # 3.5? What is the relationship of C # versions with .Net, Visual Studio, etc.?

There are books that use nomenclatures like C # 2008 ( another example ). Is this correct?

    
asked by anonymous 17.06.2014 / 18:08

1 answer

21

Therearesomecuriositiesinthislisting.

  • ThereisaversionofC#called1.2butitispracticallyunknown.Inadditiontosmallchanges,theinterfaceIDisposableandeverythingthatisnecessaryforitsoperationwascreated.Somefeatures,suchasIEnumerator,havestartedusingit.
  • The.NETversionisnotsynchronizedwiththelanguageversion,since.NETisnotuniquetoC#.Sosomeonemightthinkthatbecausethereisa.NET3.5thereshouldbeaC#3.5.Thatisnotthecase.
  • .NET3.0versioninthebackgroundis.NET2.0withextralibraries(WPF,WCF,WF,etc.).
  • VisualStudiowasinitiallycalled.NETbecauseallMicrosoftproductswouldbecalledthat,butthiswasthenabandoned.Thereisatrademarkthatfollowstheapproximateyearsofitslaunchandatechnicalversion.Versionspriorto7.0existedbutdidnotinclude.NET.
  • .NET3.5istheoldestsupported.

EvolutionofC#

  • C#2.0introducedGenerics,Partialtypes,Anonymousmethods,Nullabletypes,SeparateaccessibilityforGetter/setter,Methodgroupconversions,Covariance/Counter-varianceandStaticclasses.
  • C#3.0introducedimplicitlytypedlocalvariables,initializersforobjectsandcollections,self-implementedproperties,Anonymoustypes,Extensionmethods,Queryexpressions,Lambdaexpressions,Expressiontrees,andPartialMethods.
  • C#4.0introducedDynamicbinding,Namedandoptionalarguments,Genericco-andcontravariance,andEmbeddedinteroptypes("NoPIA").
  • C # 5.0 introduced Asynchronous methods and Caller info attributes.
  • C # 6.0 introduced the .Net Compiler Platform (Roslyn), initializers for auto-properties, Using importing static members, Exception filters, event initializers, await within catch and finally Extension Add methods, collection initializers, null propagation, Expression-bodied members, nameof operator, interpolation of strings .
  • C # 7.0 introduced tuples, out var , binary literals and separators, local functions, ref returns, Expression-bodied everywhere, Type Switch and arbitrary async.

Some restrictions on using combined technologies exist:

  • It is not possible to use C # 2 (it is common to omit the release in the language version) without .NET 2.0.
  • .NET 3.5 is required to use C # 3. However most C # 3 features can be used even with .NET 2.0 or 3.0.
  • You can select the version of .NET that your application should run. VS 2005 onwards, under normal conditions, can not use .NET 1.0 and 1.1 as the application's target .
  • You can not request a version of VS to restrict the features of C # from lower versions than that installed on it.
  • Each version of VS has a different format than the project file, and a conversion of the old one will be done automatically.

Note that .NET versions refer to the .NET Framework. Not to be confused with .NET as a platform as a whole that obviously has no version. OR with the .NET Core which is another product.

.NET has some divisions like the Base Class Library (BCL) which is a superset of the Framework Class Library (FCL). FCL is required in any implementation that wants compatibility with .Net (Mono for example implements all FCL and parts of BCL). In BCL is included Windows Forms, WPF, ASP.Net, etc.

The Common Language Runtime (CLR) is the virtual machine that controls applications written for .Net. Note that it is much more stable and evolves on rare occasions. This is where you have all the security control, garbage collector , exception handling, JITter a>, threads control, etc.

There is even a Visual Studio C # 2010, for example. It is Visual Studio specific to C #. But the language does not call C # 2010.

Microsoft Documentation .

The question and answer were inspired by Jon Skeet's post .

    
17.06.2014 / 18:08