Joshua Goodman Group Program Manager Microsoft Corporation
.NET 1.0.NET 1.1.NET NET CTP!
Base Class Libraries The CLR JIT & NGEN Garbage Collector Security Model Exception Handling Loader & Binder Profiling& Debugging APIs WPF Win Forms DLR Dynamic Language Runtime DLR Dynamic Language Runtime ASP. NET WCF And more! LINQ
Thread [] threads = new Thread[8]; for (int i=0; i<8; i++) { Worker worker = new Worker(); threads[i] = new ThreadStart(worker.Work); threads[i].Start(); worker.identity =i; } Code from an Outlook addin our executives used
Thread [] threads = new Thread[8]; for (int i=0; i<8; i++) { Worker worker = new Worker(); threads[i] = new ThreadStart(worker.Work); threads[i].Start(); worker.identity =i; } Code from an Outlook addin our executives used
.NET 1.0.NET 1.1.NET NET 4.0
.NET 2.0.NET addin 3.0 addin addin 4.0 addin Host Process (e.g. Outlook) i i
public Tuple DivAndRemainder(Int32 i, Int32 j) { return new Tuple.Create(i/j, i%j); } // An example of someone accessing items in a tuple. for (Int16 i = 0; i <= 25; i++) { for (Int16 j = 1; j <= 5; j++) { var tuple = DivAndRemainder(i,j); Console.WriteLine("{0}\t{1}\t{2}\t{3}\n", i, j, tuple.item1, tuple.item2); }
Parallel.For(0, n, i => work(i)); Parallel.ForEach(data, e => work(e));.AsParallel() var results = from item in shows.AsParallel() where item.Description.Contains(keyword) && item.Year > startYear orderby item.StartTime ascending select item;
Parallel.For(0, n, i => work(i)); Parallel.ForEach(data, e => work(e));
Ephemeral Segment Other Segments Generation 0, 1 and parts of Generation 2 live here Most of Generation 2 lives here
Ephemeral Segment Other Segments Ephemeral Segment Other Segments Generation 0, 1 and parts of Generation 2 live here Most of Generation 2 lives here
Ephemeral Segment Other Segments Generation 0, 1 and parts of Generation 2 live here Most of Generation 2 lives here
Raw latency in microseconds Background GC Concurrent GC Profiling samples of latency during application execution
public void FileSave(String name) { try { FileStream fs = new FileStream(name, FileMode.Create); } catch(Exception e) { MessageBox.Show("File Open Error"); throw new Exception(IOException); }
public void FileSave(String name) { try { FileStream fs = new FileStream(name, FileMode.Create); } catch(Exception e) { MessageBox.Show("File Open Error"); throw new Exception(IOException); }
public void BuyMoreStuff(Item[] cart, ref Decimal totalCost, Item i) { CodeContract.Requires(totalCost >=0); CodeContract.Requires(cart != null); CodeContract.Requires(CodeContract.ForAll(cart, s => s != i)); CodeContract.Ensures(CodeContract.Exists(cart, s => s == i); CodeContract.Ensures(totalCost >= CodeContract.OldValue(totalCost)); CodeContract.EnsuresOnThrow ( totalCost == CodeContract.OldValue(totalCost)); // Do some stuff … }
Please fill out your evaluation for this session at: This session will be available as a recording at:
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.