1 / 164

C# E volution

C# E volution. Mariusz Bojkowski. Mariusz Bojkowski. Passionate programmer Focused on C# / .NET Has a blog: https://CSharp.Today Twitter: @ CSharp Today Facebook: https://fb.me/CSharp.Today. Agenda. Cool Conception The C# Name C# Feature s The new C# 8.0. COOL Conception.

paulp
Download Presentation

C# E volution

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. C# Evolution • Mariusz Bojkowski

  2. Mariusz Bojkowski • Passionate programmer • Focused on C# / .NET • Has a blog: https://CSharp.Today • Twitter: @CSharpToday • Facebook: https://fb.me/CSharp.Today

  3. Agenda • CoolConception • The C# Name • C# Features • The new C# 8.0

  4. COOL Conception

  5. https://1.fwcdn.pl/an/49468/2015/67365.12.jpg Picture source: https://cdn1.img.sputniknews.com/images/105081/72/1050817252.jpg

  6. 1996 Dolly the Sheepwas born https://timedotcom.files.wordpress.com/2016/06/dolly.jpeg

  7. Common Language Runtime 1996 Developed as incubation project by COM+ team

  8. Common Language Runtime 1996 Developed as incubation project by COM+ team Called COR

  9. WhatdoesCOR stand for?

  10. WhatdoesCOR stand for? HINTSDeveloped by COM+ teamCOM means Component Object Model

  11. Component Object Runtime =COR

  12. 1998 Google was founded https://www.qs.com/4-things-your-university-brand-learn-from-googles-new-logo/

  13. CLR team started 1998 CLR was written in SMC

  14. What does SMC stand for?

  15. Simple Managed C = SMC

  16. 1999 Star Wars: Episode I https://upload.wikimedia.org/wikipedia/en/4/40/Star_Wars_Phantom_Menace_poster.jpg

  17. Team to build new language 1999 Anders Hejlsberg co-designed • Turbo Pascal • Delphi • C# • TypeScript

  18. What was the code name?

  19. What was the code name? HINTIt was very cool code name

  20. What was the code name? COOL

  21. What does COOL stand for?

  22. C-like Object Oriented Language = COOL

  23. 2000 https://i.iplsc.com/windows-me/0004KX25O7X73W9L-C122-F4.jpg

  24. 2000 Polish instant messenger https://gadu-gadu.pl/

  25. COOL renamed to C# 2000 .NET announced .NET ported to C# ASP.NET ported to C#

  26. 2002 was founded https://www.spacex.com/

  27. 2018 2002 was founded https://www.spacex.com/

  28. Visual Studio .NET released 2002 C# 1.0 .NET Framework ASP.NET

  29. The C# name

  30. When C# name was used for the first time? HINTs ? 2000 – Cool renamed C# 1999 – Created team to build COOL / C# 1998 – Created team to build CLR 1996 – First work on CLR

  31. 1988 When C# name was used for the first time? Picture source: https://www.urbanghostsmedia.com/wp-content/uploads/2015/06/delorean-time-machine-2.jpg

  32. MS used C# name for the first time 1988 Variant of C language Designed for incremental builds The project wasn’t finished

  33. C# name origin Inspired by musical notation A note should be a semitone higher C♯

  34. C# name origin Inspired by musical notation A note should be a semitone higher

  35. C# name origin Like C++ is a next version of C The same C♯ is a next version of C++

  36. C# name origin Musical sharp (♯) was simplified to number sharp (#) C♯ → C#

  37. C# Features

  38. partials

  39. Partial types partialclassPartialClassExample { void Method1() { } } partialclassPartialClassExample { voidSomeOtherMethod() { } }

  40. Partial methods • partialclassPartialMethods • { • partialvoidDoWork(); • } • partialclassPartialMethods • { • partialvoidDoWork() •     { • // Do something •     } • }

  41. MethodsdelegatesLambdas

  42. Methods, events, handlers publiceventEventHandlerMyEvent; voidEventExample() { MyEvent += newEventHandler(EventExample_MyEvent); } publicvoidFireMyEvent() { EventHandlermyEvent = MyEvent; if (myEvent != null) { myEvent(this, EventArgs.Empty); } }

  43. Method group conversions voidEventExample() { MyEvent += newEventHandler(EventExample_MyEvent); }

  44. Method group conversions voidEventExample() { MyEvent += newEventHandler(EventExample_MyEvent); } voidEventExample() { MyEvent += EventExample_MyEvent; }

  45. Anonymous methods • voidEventExample() • { • // Use anonymous methods • MyEvent += delegate (objectsender, EventArgsargs) •     { • // Do somework •     }; • }

  46. Lambda expressions • voidEventExample() • { • // Use lambda expressions • MyEvent += (sender, args) => •     { • // Do somework •     }; • }

  47. Extension methods • publicstaticvoidMyMethod(thisstring s) { } • staticvoidExample() • { • "value".MyMethod(); • }

  48. Expression trees • Expression<Func<int, int, int>> sumExpression = •     (a, b) => a + b; • int sum2 = sumExpression.Compile()(1, 2);

  49. Query expressions • varadults = • from person indb.People • whereperson.Age > 18 • selectnew { person.FirstName, person.LastName };

  50. local functions • voidMyMethod(int value) • { • LocalFunction(); • voidLocal() { }// Can access ‘value’ • }

More Related