201209 tech days .net 4.5 核心功能及綜覽

1,066 views

Published on

2012 TechDays Taipei
.NET 4.5 核心功能及綜覽

Published in: Technology
1 Comment
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total views
1,066
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
22
Comments
1
Likes
0
Embeds 0
No embeds

No notes for slide

201209 tech days .net 4.5 核心功能及綜覽

  1. 1. 蔡孟儒技術推廣協理台灣微軟技術暨平台推廣處
  2. 2. WHY Change? 在趨勢的演進中拉距
  3. 3. .NET 簡史以及相容性
  4. 4. 橫線上的較新版本皆為in-place updates (就地更新) .NET 4.5 於安裝時取代 .NET 4 .NET 4.5 .NET 4 (或升級 Windows 8時) .NET 2.0 .NET 3.0 .NET 3.5 .NET 4 仍可在Visual Studio 2012 中設為目 標Framework .NET 1.1.NET 1.02002 2003 2005 2008 2010 2012
  5. 5. Migration Guide to the .NET Framework 4.5:http://msdn.microsoft.com/en-us/library/ff657133(v=VS.110).aspxApplication Compatibility in the .NET Framework 4.5http://msdn.microsoft.com/en-us/library/hh367887(v=VS.110).aspx
  6. 6. http://msdn.microsoft.com/en-us/library/hh266747(VS.110).aspx
  7. 7. .NET 4.5 重要特色 .NET for Windows 市集應用程式
  8. 8. Desktop
  9. 9. C#版的WinRT App…
  10. 10. ECMA 335
  11. 11. DllImport "avicap32.dll" "capCreateCaptureWindow"static extern int string int int int int int int int DllImport "avicap32.dll"static extern bool int MarshalAs UnmanagedType ref string int MarshalAs UnmanagedType ref string int// more and more of the same
  12. 12. using Windows.Media.Capture;var new CameraCaptureUI new Sizevar await CameraCaptureUIModeif var new BitmapImage await FileAccessMode
  13. 13. http://software.intel.com/en-us/articles/using-winrt-apis-from-desktop-applications
  14. 14. Async & Await
  15. 15. varvar
  16. 16. .NET 以往處理非同步運算的方法
  17. 17. 除了好寫、易讀,debug更容易private void UseData(String filePath) { Byte[] buff = new Byte[BuffSize]; using (Stream str = File.OpenRead(filePath)) { IAsyncResult asRes = str.BeginRead(buff, 0, buff.Length, (ar) => { if (!ar.CompletedSynchronously) { Int32 len = str.EndRead(ar); ProcessData(buff, len); } }, state: null); if (asRes.CompletedSynchronously) { Int32 lenRes = str.EndRead(asRes); ProcessData(buff, lenRes); } }}private async Task UseDataAsync(String filePath) { Byte[] buff = new Byte[BuffSize]; using (Stream str = File.OpenRead(filePath)) { Int32 lenRes = await str.ReadAsync(buff, 0, buff.Length); ProcessData(buff, lenRes); }}
  18. 18. http://blogs.msdn.com/b/windowsappdev/archive/2012/04/24/diving-deep-with-winrt-and-await.aspx
  19. 19. ReadAsyncWriteAsync CopyToAsync FlushAsyncReadLineAsync ReadToEndAsync Stream FileStreamMemoryStream TextReader TextWriter http://msdn.microsoft.com/en-us/library/kztecsys
  20. 20. To handle the exception in C# or Visual Basic, you use a try/catch blockjust as you do with synchronous code today:var title;var feedUri = new Uri("http://www.devhawk.com/rss.xml");var client = newWindows.Web.Syndication.SyndicationClient();try{var feed = await client.RetrieveFeedAsync(feedUri);title = feed.Title.Text;}catch (Exception ex){// An exception occurred from the async operation}
  21. 21. Portable Class Library
  22. 22. http://msdn.microsoft.com/library/gg597391(v=vs.110).aspx
  23. 23. System.Char
  24. 24. ONE ASP.NET – MVC 4, Web API, Bundling& Minification
  25. 25. ASP.NET more pluggable,more open, more fun Scott Hanselman
  26. 26. Web API
  27. 27. Bundling &Minification
  28. 28. MPGO big wins in CLRgarbage
  29. 29. Windows Store App 大募集活動期間: 2012/09/20 ~ 2012/11/09 http://aka.ms/Win8AppFest
  30. 30.  年費: - 公司帳戶:NT$2,840 - 個人帳戶:NT$1,420 12個月免費: - MSDN 訂戶 - BizSpark 計劃: 新創資訊公司 - DreamSpark 計劃: 老師、學生
  31. 31. http://msdn.microsoft.com/en-us/library/ms171868(v=vs.110)http://code.msdn.microsoft.com/Whats-New-in-the-NET-e8d7545c

×