Skip to main content

What are the correct version numbers for C#?


What are the correct version numbers for C#? What came out when? Why can't I find any answers about C# 3.5?



[This question is primarily to aid those who are searching for an answer using an incorrect version number, e.g. "C# 3.5". At the time of this writing, there are several questions tagged with "c#3.5". I'm shortly going to correct this, as recommended by the answer to this question about terminology. The hope is that anyone failing to find an answer with the wrong version number will find this answer and then search again with the right version number.]



EDIT: I've now retagged all of the questions marked "c#3.5" to "c#3.0" and "c#4" to "c#4.0" (excluding this one, of course). If those of us who care about this could try to keep an eye out for new questions with those tags, that would be handy :)


Source: Tips4allCCNA FINAL EXAM

Comments

  1. These are the versions of C# known about at the time of this writing:


    C# 1.0; released with .NET 1.0 and VS2002 (January 2002)
    C# 1.2 (bizarrely enough); released with .NET 1.1 and VS2003 (April 2003). First version to call Dispose on IEnumerators which implemented IDisposable. A few other small features.
    C# 2.0; released with .NET 2.0 and VS2005 (November 2005). Major new features: generics, anonymous methods, nullable types, iterator blocks
    C# 3.0; released with .NET 3.5 and VS2008 (November 2007). Major new features: lambda expressions, extension methods, expression trees, anonymous types, implicit typing (var), query expressions
    C# 4.0; released with .NET 4 and VS2010 (April 2010). Major new features: late binding (dynamic), delegate and interface generic variance, more COM support, named arguments and optional parameters
    C# 5.0; unknown time frame. Major features: async programming, caller info attributes. To be shipped with .NET 4.5; beta available on February 29th 2012 - full release time frame still unknown.


    There is no such thing as C# 3.5 - the cause of confusion here is that the C# 3.0 is present in .NET 3.5. The language and framework are versioned independently, however - as is the CLR, which is at version 2.0 for .NET 2.0 through 3.5, .NET 4 introducing CLR 4.0, service packs notwithstanding.

    More detailed information about the relationship between the language, runtime and framework versions is available on the C# in Depth site. This includes information about which features of C# 3.0 you can use when targeting .NET 2.0. (If anyone wants to bring all of the content into this wiki answer, they're welcome to.)

    ReplyDelete
  2. The biggest problem when dealing with C#'s version numbers is the fact that it is not tied to a version of the .NET Framework, which it appears to be due to the syncronized releases between Visual Studio and the .NET Framework.

    The version of C# is actually bound to the compiler, not the framework. For instance, in VS2008 you can write C# 3.0 and target .NET Framework 2.0, 3.0 and 3.5. The C# 3.0 nomenclature describes the version of the code syntax and supported features in the same way that ANSI C89, C90, C99 describe the code syntax/features for C.

    Take a look at Mono, you will see that Mono 2.0 (mostly implemented version 2.0 of the .NET Framework from the ECMA specs) supports the C# 3.0 syntax and features.

    ReplyDelete
  3. C# 1.0 with Visual Studio.NET

    C# 2.0 with Visual Studio 2005

    C# 3.0 with Visual Studio 2008

    C# 4.0 with Visual Studio 2010

    C# 5.0 installs on top of Visual Studio 2010, please refer http://blog.functionalfun.net/2010/10/pdc-2010-speculations.html for C#5.0.

    ReplyDelete
  4. VERSION_____LANGUAGE SPECIFICATION______MICROSOFT COMPILER

    C# 1.0/1.2____December 2001?/2003?___________January 2002?

    C# 2.0_______September 2005________________November 2005?

    C# 3.0_______May 2006_____________________November 2006?

    C# 4.0_______March 2009 (draft)______________April 2010?

    ReplyDelete

Post a Comment

Popular posts from this blog

Why is this Javascript much *slower* than its jQuery equivalent?

I have a HTML list of about 500 items and a "filter" box above it. I started by using jQuery to filter the list when I typed a letter (timing code added later): $('#filter').keyup( function() { var jqStart = (new Date).getTime(); var search = $(this).val().toLowerCase(); var $list = $('ul.ablist > li'); $list.each( function() { if ( $(this).text().toLowerCase().indexOf(search) === -1 ) $(this).hide(); else $(this).show(); } ); console.log('Time: ' + ((new Date).getTime() - jqStart)); } ); However, there was a couple of seconds delay after typing each letter (particularly the first letter). So I thought it may be slightly quicker if I used plain Javascript (I read recently that jQuery's each function is particularly slow). Here's my JS equivalent: document.getElementById('filter').addEventListener( 'keyup', function () { var jsStart = (new Date).getTime()...

Is it possible to have IF statement in an Echo statement in PHP

Thanks in advance. I did look at the other questions/answers that were similar and didn't find exactly what I was looking for. I'm trying to do this, am I on the right path? echo " <div id='tabs-".$match."'> <textarea id='".$match."' name='".$match."'>". if ($COLUMN_NAME === $match) { echo $FIELD_WITH_COLUMN_NAME; } else { } ."</textarea> <script type='text/javascript'> CKEDITOR.replace( '".$match."' ); </script> </div>"; I am getting the following error message in the browser: Parse error: syntax error, unexpected T_IF Please let me know if this is the right way to go about nesting an IF statement inside an echo. Thank you.