Fireship · @fireship

C# in 100 Seconds

Uploaded December 6, 2021 · Length 2:27

C# in 100 Seconds

Summary

A 100-second introduction to C#, covering its history, features, and basic syntax.

  • csharp basics
  • csharp tutorial
  • csharp programming language
  • csharp syntax
  • net framework

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    CP A statically typed general purpose

  2. 0:02

    programming language famous for being

  3. 0:04

    the Workhorse of the windows.net

  4. 0:06

    framework it was created in the year

  5. 0:07

    2000 by Anders hilburg at Microsoft it

  6. 0:10

    was designed as a modern sealike

  7. 0:12

    objectoriented language and was

  8. 0:14

    originally going to be called cool

  9. 0:15

    initially it was criticized as imitation

  10. 0:18

    Java but it's evolved into one of the

  11. 0:20

    most popular and well- Lov languages to

  12. 0:22

    this day it can be used to build almost

  13. 0:23

    anything like desktop apps on net core

  14. 0:26

    crossplatform mobile apps with zamarin

  15. 0:28

    web applications with Blazer and video

  16. 0:30

    games with the unity framework it became

  17. 0:32

    open source software in 2014 and can be

  18. 0:34

    used to build apps outside of the Net

  19. 0:36

    Framework C code is compiled into an

  20. 0:38

    intermediate language which can then be

  21. 0:40

    interpreted by the common language

  22. 0:41

    runtime where it can be executed as

  23. 0:43

    native machine code on any operating

  24. 0:45

    system without the need to recompile

  25. 0:47

    it's known primarily as an

  26. 0:48

    objectoriented language but also

  27. 0:50

    supports functional Lambda expressions

  28. 0:52

    and has the ability to write a

  29. 0:53

    declarative query on any data structure

  30. 0:55

    with a feature called link it's a Memory

  31. 0:57

    safe language thanks to garbage

  32. 0:59

    collection although it is possible to

  33. 1:01

    create an unsaved context if you want to

  34. 1:03

    allocate your own memory with pointers

  35. 1:05

    to get started install the net core SDK

  36. 1:07

    then open the terminal to an empty

  37. 1:09

    directory and Run net new to create a

  38. 1:11

    new application that creates a

  39. 1:13

    program.cs file that Imports the system

  40. 1:15

    namespace at the top then provides a

  41. 1:17

    class with a main function which is

  42. 1:19

    where your code will start executing

  43. 1:20

    declare a variable by starting with a

  44. 1:22

    type followed by a name and value by

  45. 1:25

    default a value cannot be null but you

  46. 1:27

    can make it nullable by adding a

  47. 1:28

    question mark to the type now to

  48. 1:30

    organize our code and share it in other

  49. 1:32

    files we will wrap it in a namespace we

  50. 1:34

    can then create a new class inside the

  51. 1:35

    namespace that has a Constructor when

  52. 1:37

    the class is instantiated and a

  53. 1:39

    Destructor when the class goes out of

  54. 1:41

    scope classes support inheritance

  55. 1:43

    polymorphism and everything else you

  56. 1:44

    would expect in a modern object-oriented

  57. 1:46

    language we can define a property on the

  58. 1:49

    class and make it readable with get or

  59. 1:51

    writable with set the language doesn't

  60. 1:52

    have top level functions but rather

  61. 1:54

    methods that are defined as a member of

  62. 1:56

    a class however it does support Lambda

  63. 1:58

    expressions or anonymous functions and