63

I have Visual Studio 2012 RC installed on Windows 8 Release Preview and my question is are there any useful new features not related to Metro, or is Metro what seperates .Net 4 and .Net 4.5?

svick
  • 214,528
  • 47
  • 357
  • 477
JMK
  • 24,985
  • 50
  • 147
  • 268
  • 78
    So annoying when you find a SO question on google which is exactly what you're looking for but it's closed ['Not a real question']. Who cares if it's not a 'real' question? it's the second result when googling 'whats new in c#5' and it's now a closed question. If people are searching for it, and landing here, how can it not be a valid question? – Gary W Feb 04 '13 at 10:35
  • 1
    @GaryW The link provided by svick more or less sums it up, .Net 4.5 is an in place upgrade of .Net 4, so you get the bug fixes to the 4.0 compiler for free (which sounds good until you need to to support .Net 4 machines, in which case this can be problematic as things that run fine on your dev machine may crash on the target machine), apart from that its Async and Await ([which work on .net 4](http://stackoverflow.com/questions/9110472/using-async-await-on-net-4)), [caller information](http://msdn.microsoft.com/en-us/library/hh534540.aspx), and Visual Studio 2012 has better intellisense. – JMK Feb 04 '13 at 11:21
  • 1
    Also, if you are working on Windows 8, you can create Windows Phone 8 and Windows 8 Start Screen (or whatever you're supposed to call it) apps. You can also target Windows Phone 7 on Windows 8 with Visual Studio 2012, but if you are running on Windows 7, you need to use Visual Studio 2010 to target Windows Phone 7. – JMK Feb 04 '13 at 11:25
  • 1
    @Gary-W , put this question as part of mine [Wasn't it .NET 4.0 TPL that made APM, EAP and BackgroundWorker asynchronous patterns obsolete?](http://stackoverflow.com/questions/16363263/wasnt-it-net-4-0-tpl-that-made-apm-eap-and-backgroundworker-asynchronous-patt) – Gennady Vanin Геннадий Ванин May 03 '13 at 19:08
  • 10
    I voted to re-open. The answers to everything asked on SO are out there in books and documentation, but the community is usually better able to divine the important parts and teach more clearly, give better examples. That's why we use SO! That's why we like it. It's a good question which is has a practical slant. Stop closing questions, we all derive a VAST amount of value from opinion in life and SO is no different! – Luke Puplett Nov 25 '13 at 10:53
  • 17
    This is completely *ON* topic, in my opinion, and amusingly the mod who closed it has plenty of up-votes for answering "What are the Best free controls for .NET?"... duplicity at its' best! :) – Moo-Juice Dec 14 '13 at 13:00
  • 1
    @JMK +1 just for `which sounds good until you need to to support .Net 4 machines` as I've been bitten by such things in the .NET 3.0/3.5 era as well. – Jeroen Wiert Pluimers Feb 27 '14 at 19:05
  • 3
    I think the moderatero who closed this topic owes a clear explanation to the people who googlified here. – Burak Karakuş Oct 04 '14 at 20:14
  • 1
    Related: What can I do with C# 5 *on .NET 4* that I couldn't do with C# 4 (on .NET 4)? – Colonel Panic Oct 06 '14 at 15:51
  • @Moo-Juice: It may be on-topic, but it is still out of scope. You can't possibly give a comprehensive answer (except a joke answer) in less than the length of a book. – Ben Voigt Jul 15 '15 at 00:24

1 Answers1

40

See What's New in the .NET Framework 4.5 and What's New for Visual C# in Visual Studio 2012.

The biggest new feature of C# 5.0 is better support for asynchronous operations, using the new await keyword.

svick
  • 214,528
  • 47
  • 357
  • 477