C# in 100 Seconds

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.พ. 2025
  • C# or C-Sharp is the programming language behind .NET (dotnet) and the Unity framework. It was created at Microsoft as a C-like object-oriented language and is used to build apps for web, desktop, mobile, and more.
    #programming #unity #100SecondsOfCode
    🔗 Resources
    .NET Install dotnet.microso...
    C# docs docs.microsoft...
    Unity unity3d.com
    🔥 Get More Content - Upgrade to PRO
    Upgrade to Fireship PRO at fireship.io/pro
    Use code lORhwXd2 for 25% off your first payment.
    🎨 My Editor Settings
    Atom One Dark
    vscode-icons
    Fira Code Font
    🔖 Topics Covered
    What is C#?
    C# Basics Tutorial
    History of C#
    How C# works
    What is C# used for?
    Who invented C#?

ความคิดเห็น • 1.7K

  • @haresmahmood
    @haresmahmood 3 ปีที่แล้ว +7277

    C# is just really comfortable to work with imo - it's always felt like the better version of Java to me

    • @khodis2002
      @khodis2002 3 ปีที่แล้ว +274

      Yeah, it has so many features and I can't think without them in Java.

    • @michawhite7613
      @michawhite7613 3 ปีที่แล้ว +159

      The only thing in Java that I like more is checked exceptions. It helps me really make sure I've covered all my bases, which is pretty important for a web app imo

    • @anthonysteinerv
      @anthonysteinerv 3 ปีที่แล้ว +120

      Java is fucking garbage tbh.

    • @meceffeukada3767
      @meceffeukada3767 3 ปีที่แล้ว +77

      I've used both and for me Java is always my choice except for web

    • @user-ge2vc3rl1n
      @user-ge2vc3rl1n 3 ปีที่แล้ว +183

      The one thing I really dislike about C# is the naming conventions for certain things. IE: "dot net", "linq", "dot net framework" etc, there's probably a dozen set of technologies/frameworks that are named really poorly.

  • @chalk1007
    @chalk1007 2 ปีที่แล้ว +455

    This channel is a literal life saver. When trying to learn a second language, you are bombarded with a lot of things you already know. Fireship only provides you with the things you don't know. Cheers

    • @amogus7153
      @amogus7153 ปีที่แล้ว +12

      Spanish is prob a better second language lol

    • @pointyorb
      @pointyorb ปีที่แล้ว

      ​@@amogus7153Spanish is my favorite coding language

    • @Ravoh39
      @Ravoh39 9 หลายเดือนก่อน

      namespace Zoho_HybridFramework.Base
      {
      public class BaseTest
      {
      public ExtentReports rep = ExtentManager.getInstance();
      public Keywords app = null;
      [TearDown]
      public void quit()
      {
      if (rep != null)
      rep.Flush();
      if (app != null)
      app.getGenericKeywords().closeBrowser();
      }
      }
      }

    • @Rick-oh39
      @Rick-oh39 9 หลายเดือนก่อน

      @@amogus7153 want the application to be extensible, that is, to be able to add new modules that implement new commands without having to change the main application source. The tree looks something like:

    • @Rick-oh39
      @Rick-oh39 9 หลายเดือนก่อน

      @@amogus7153 /*
      namespace Zoho_HybridFramework
      {
      public class ExtentManager
      {
      public static ExtentHtmlReporter htmlReporter;
      private static ExtentReports extent;
      private ExtentManager()
      {
      }
      public static ExtentReports getInstance()
      {
      if (extent == null)
      {
      string reportFile = DateTime.Now.ToString().Replace("/", "_").Replace(":", "_").Replace(" ", "_") + ".html";
      htmlReporter = new ExtentHtmlReporter(Constants.REPORT_PATH + reportFile);
      extent = new ExtentReports();
      extent.AttachReporter(htmlReporter);
      extent.AddSystemInfo("OS", "Windows");
      extent.AddSystemInfo("Host Name", "Gunjan");
      extent.AddSystemInfo("Environment", "QA");
      extent.AddSystemInfo("UserName", "Gunjan");
      string filePath = Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory);
      filePath = Directory.GetParent(Directory.GetParent(filePath).FullName).FullName;
      htmlReporter.LoadConfig(filePath + "\\util\\extent-config.xml");
      }
      return extent;
      }
      }
      }*/
      i tried using id and name so i am trying to use this code to identify an element on the screen and also create a report for testing. The dll is not working.
      want the application to be extensible, that is, to be able to add new modules that implement new commands without having to change the main application source. The tree looks something like:
      want the application to be extensible, that is, to be able to add new modules that implement new commands without having to change the main application source. The tree looks something like:
      want the application to be extensible, that is, to be able to add new modules that implement new commands without having to change the main application source. The tree looks something like:

  • @somedevstuff5060
    @somedevstuff5060 3 ปีที่แล้ว +5373

    How to create a successful indie game that makes alot of money in 100 seconds

    • @sergsergesrgergseg
      @sergsergesrgergseg 3 ปีที่แล้ว +278

      in 30 years

    • @lastidea4925
      @lastidea4925 3 ปีที่แล้ว +149

      LMAO keep believe that boi

    • @user-wc1sm8cj8s
      @user-wc1sm8cj8s 3 ปีที่แล้ว +150

      More like "Building a Unicorn Start-up in 100 seconds"

    • @barigamb
      @barigamb 3 ปีที่แล้ว +24

      @@user-wc1sm8cj8s Ben Awad would like to know your address.

    • @user-wc1sm8cj8s
      @user-wc1sm8cj8s 3 ปีที่แล้ว +33

      @@barigamb LOL, I've been following Ben Awad for a while and seems building companies isn't really his thing, LOL, especially those VS Code plugin businesses of his. He better stick with React

  • @irithylloldman6526
    @irithylloldman6526 3 ปีที่แล้ว +2313

    the best part about this langage is definitely the documentation. MSDN is so delightful to read compared to any other doc you could find ! Also the community is cool and non elitist.

    • @driedurchin
      @driedurchin 3 ปีที่แล้ว +141

      I feel like this is actually the most important part of a language for me. Like C++ isn't a bad language, but the documentation and tooling around it just makes me hate working with it. I'm not a big fan of C# (more of a Rust guy), but having nice documentation and tooling just elevates the experience so much. Honestly, I feel like it's a sin when a language doesn't prioritize that stuff.

    • @RiwenX
      @RiwenX 3 ปีที่แล้ว +42

      What? MSDN is terrible. Compare it to something like Rust's docs... I have been working with C# for like 7 years now (on and off), but I'm defecting to Rustaceans.

    • @KookoCraft
      @KookoCraft 3 ปีที่แล้ว +92

      @@driedurchin you rlly just compared C# and rust... lol k

    • @ysammo214
      @ysammo214 3 ปีที่แล้ว +5

      This makes me feel so much better about learning it

    • @Kokurorokuko
      @Kokurorokuko 2 ปีที่แล้ว +76

      @@KookoCraft no, they compared C#'s documentation and Rust's documentation.

  • @chadkrause4694
    @chadkrause4694 3 ปีที่แล้ว +1062

    C# is one of my favorite languages. The ease of multithreading/nonblocking calls makes it easy to squeeze a ton of performance out of it

    • @ionitaa
      @ionitaa 3 ปีที่แล้ว +59

      Such a Chad thing to say!

    • @marcs9451
      @marcs9451 2 ปีที่แล้ว +13

      You might enjoy Go if you like easy multi threading

    • @andromedarealm3776
      @andromedarealm3776 2 ปีที่แล้ว +30

      @@marcs9451 NO! Please stop

    • @iqbaltaufiq17
      @iqbaltaufiq17 2 ปีที่แล้ว +4

      @@andromedarealm3776 why?

    • @thedragonrises6882
      @thedragonrises6882 2 ปีที่แล้ว

      @@marcs9451 goroutines are love!

  • @photonic083
    @photonic083 ปีที่แล้ว +57

    1:30 "to organize our code and share it with other files, we will wrap it in a namespace".
    Namespaces always really confused me in c#, but those 2 simple sentences explained it in a way that I clearly understood and instantly cleared up many things. Tysm ❤️

  • @rico993
    @rico993 2 ปีที่แล้ว +349

    I feel like C# has settled comfortably as the Swiss Army Knife of programming languages. It's not the best at anything, but it's pretty good at almost everything. It has just enough power to do some really complex tasks, but still has enough safeguards to keep you from hurting yourself too badly.

    • @s1nistr433
      @s1nistr433 ปีที่แล้ว +37

      It has the fastest web framework that still has a community. Everything that outperforms .NET Core usually has no community or 3rd party plugins backing it

    • @FriedMonkey362
      @FriedMonkey362 ปีที่แล้ว

      And i hate myself for learning it as my first language, because everything else i try now is either too hard or too simple
      C is still fine, but c++ is just an overgrown mess that makes me want to kiII myself whenever i try to learn it

    • @larin1327
      @larin1327 ปีที่แล้ว +2

      you just described Java Script😂

    • @captainvaughn5692
      @captainvaughn5692 ปีที่แล้ว

      the only difference is that javascript is a weird mess of things that shouldn't... be were they are@@larin1327

    • @hallrules
      @hallrules ปีที่แล้ว +56

      @@larin1327 except its not trash

  • @rubenjwz
    @rubenjwz 3 ปีที่แล้ว +33

    This is the perfect format: sparking interest with an explanatory introduction to a language, framework/library or some other topic, but then also providing in depth videos of those concepts. Love it.

  • @hajiamano22
    @hajiamano22 3 ปีที่แล้ว +86

    C# was my first language and it will always have a special place in my heart.

    • @a-baby9
      @a-baby9 22 วันที่ผ่านมา +2

      Before English? 😂

  • @Tsunami14
    @Tsunami14 3 ปีที่แล้ว +29

    C# is an absolute joy to work with. Glad it finally got featured.

  • @MechMK1
    @MechMK1 3 ปีที่แล้ว +2458

    It should be noticed that destructors are very uncommon in C#, unlike C++.

    • @plrc4593
      @plrc4593 3 ปีที่แล้ว +259

      Because C# is more high level and has garbage collector.

    • @TabooRetka701
      @TabooRetka701 3 ปีที่แล้ว +87

      Yep, in c++ you have to manually control lifetime of aggregates

    • @waffle8364
      @waffle8364 3 ปีที่แล้ว +82

      deconstructors are uncommon in most languages

    • @sp00l
      @sp00l 3 ปีที่แล้ว +214

      I've been using C# to program games for 5 years now and I had no idea C# had destructors, haha.

    • @plrc4593
      @plrc4593 3 ปีที่แล้ว +9

      @@sp00l Hehe. Did you use Unity or something else?

  • @darkhacks5743
    @darkhacks5743 3 ปีที่แล้ว +11

    I started learning c# a few days ago and here you are making a video on it! Thanks for all this high-quality content

  • @81NARY
    @81NARY 3 ปีที่แล้ว +702

    I love C#, with the introduction of C# 10 (along with .Net 6) it now has file scoped namespaces, top-level statements, global + implicit usings (imports), nullable types and lots more! Still no discriminated unions, but it's planned.

    • @nameless4086
      @nameless4086 3 ปีที่แล้ว +16

      is .net 6 live rn?

    • @81NARY
      @81NARY 3 ปีที่แล้ว +37

      @@nameless4086 Yep since Nov 10th.

    • @WonderfulPlays
      @WonderfulPlays 3 ปีที่แล้ว +6

      Are the discriminated unions really planned sooned? Or more like we would like to do it eventually, but nobody knows when?

    • @haxi52
      @haxi52 3 ปีที่แล้ว +12

      Nullable value types were introduced in C#2, and nullable reference types (to enforce the opposite) in C#8

    • @81NARY
      @81NARY 3 ปีที่แล้ว +6

      @@WonderfulPlays Yeah not soon but more like "planned" they might drop in the next cycle or we might not see them for another couple years, but in any case, it would be a welcome feature.

  • @MZZenyl
    @MZZenyl 2 ปีที่แล้ว +62

    Destructors, aka. finalizers, should only be used in C# when absolutely necessary, as they introduce a significant amount of overhead.
    The GC takes care of most memory cleanup, with the IDisposable interface pattern being used for cleaning up unmanaged memory (memory that the GC doesn't manage).

  • @tylersustare
    @tylersustare 3 ปีที่แล้ว +224

    C# is pretty great ♥️ I do love the journey from proprietary Microsoft nonsense to what it is today. Also Ruby in 💯 🙏

    • @duckonaroll1913
      @duckonaroll1913 2 ปีที่แล้ว +10

      open source microsoft my beloved

  • @amadii8768
    @amadii8768 2 ปีที่แล้ว +58

    it should also be noted that C# is easier to decompile, often requiring some masking techniques in order to prevent access to the code, for example in Unity, IL2CPP recompiles the c# code into a intermediate language, which is then recompiled into c++ (hence the cpp)

    • @bananya6020
      @bananya6020 2 ปีที่แล้ว +3

      you can still decompile the generated c++ code last i heard, though, since it has more metadata bundled in than "pure" c++
      source: friend in school develops a beat saber modding platform

    • @AcceleratedVelocity
      @AcceleratedVelocity ปีที่แล้ว +5

      btw IL2CPP = Interpreted Language 2 (to) c++

    • @99EKjohn
      @99EKjohn 13 วันที่ผ่านมา

      ​@@bananya6020 yea unity does nothing to obfuscate, or encode, your code. It's funny though, if you know what you are doing, you can roll your own obfuscation, or encoding, and make it virtually impossible to reverse engineer. I know a video game hacker who writes all his hacks in c#, Ive seen the code without obfuscation on his PC, but as hard as people try, not a single one of his competitors have been able to reverse his code.

  • @conway9214
    @conway9214 3 ปีที่แล้ว +362

    2:09 async “void” is a bad practice, because it is essentially a fire-and-forget operation, difficult to unit test, and can cause the application to crash if any errors are thrown.
    Always return Task or Task, unless in the rare case where we are using async event handlers.

    • @kerboplaytv8744
      @kerboplaytv8744 3 ปีที่แล้ว +29

      javascript habits...

    • @ChristofferLund
      @ChristofferLund 3 ปีที่แล้ว +40

      @@kerboplaytv8744 even javascript returns a promise

    • @kerboplaytv8744
      @kerboplaytv8744 3 ปีที่แล้ว +1

      @Christoffer Lund Yes, but people misuse it all the time

    • @m3sian
      @m3sian 3 ปีที่แล้ว

      Yep, that will not compile

    • @jude2223
      @jude2223 3 ปีที่แล้ว +4

      Yep, the only time that I've used async void is when working on a WinForms app and I need an API call to trigger on a button press

  • @dansanger5340
    @dansanger5340 3 ปีที่แล้ว +37

    LINQ was my introduction to functional programming many years ago. At the time, I didn't know it was functional programming. I just knew it was very different and very cool.

    •  3 ปีที่แล้ว +2

      LINQ is what I miss the most when working with Java and even Python. The fluent syntax is just so good to use.
      I personally dislike the global-style of the functional part of Python. I'd rather do a list comprehension for filtering/mapping than using map and filter. What I do miss from Python, though, is list, tuples, sets and dicts being built-in, which cleans up the syntax quite a lot.

    • @mctechcraft7
      @mctechcraft7 3 ปีที่แล้ว +8

      LINQ is honestly the most OP feature of C# in my opinion. You can get so much done with just a few chained method calls. Even better you can add your own extension methods to make custom LINQ methods

    • @mctechcraft7
      @mctechcraft7 3 ปีที่แล้ว +1

      @ lists and dicts are part of System.Collections.Generic namespace. I think that is auto imported if you enable implicit using sus but id have to check

    •  3 ปีที่แล้ว

      @@mctechcraft7 extension methods are a close second indeed. About Sytem.Collections.Generic what I meant is having these data structures literally part of the syntax. Auto-importing it everywhere is cool, but still not as "transparent" as it is in Python. Out of the basic data structures, Tuple is the closest right now to feeling like part of the language (not the library), although having to access members as Item1, Item2, Item3... is still ugly IMO.

    • @janne_kekalainen
      @janne_kekalainen 3 ปีที่แล้ว

      @ For tuples in a method return type, you can do the following:
      public (int X, int Y) Do something(int a, int b){
      // Do something useful
      return (a*2,b*3)
      }
      var thing=DoSomething(1,2)
      // Since the elements were named before, we can do.
      Console.WriteLine(thing.X+thing.Y)
      // or alternatively if you want x and y as separate variables.
      (var x, var y) =Do something(1,2)
      //---
      I absolutely love tuples; they solve the annoying issue of returning multiple values from a method. Sure there was a way before with an out parameter, but tuple is a cleaner solution, in my opinion.

  • @klekaelly
    @klekaelly 3 ปีที่แล้ว +80

    C# is my favorite language. The dotnet framework is awesome.

  • @toxaq
    @toxaq 3 ปีที่แล้ว +62

    Having left the C# world 10 years ago it's great to see where it's continued on to. Would love to see a tutorial on Unity.

  • @peterhuijsen
    @peterhuijsen 3 ปีที่แล้ว +132

    Would love to see a C# tutorial for blazor web apps, seems like good stuff.

    • @knowiz8071
      @knowiz8071 3 ปีที่แล้ว +4

      Follow Tim Cory for that kind of content. He's one of the best on TH-cam.

    • @Noitcereon
      @Noitcereon 3 ปีที่แล้ว +1

      Yes, Tim Corey is my go-to for programming content. He covers a lot of topics, many of which are non-specific to C#, although he does his examples mostly in C#

  • @anasswakach1264
    @anasswakach1264 3 ปีที่แล้ว +1

    this is unbelievably perfect, the way this guy throws so much information about one language every time is unreal.
    please make a unity in 100 seconds video. thank you

  • @Rohit-nn9ky
    @Rohit-nn9ky 3 ปีที่แล้ว +674

    Finally!! A well designed language like C# should have featured earlier... But better late than never !

    • @gmxipt
      @gmxipt 3 ปีที่แล้ว +123

      Found the C# dev

    • @catholic_zoomer_bro
      @catholic_zoomer_bro 3 ปีที่แล้ว +45

      Of course it's well designed, it was designed as a Java clone :)

    • @divinsmathew
      @divinsmathew 3 ปีที่แล้ว +6

      @@catholic_zoomer_bro poda patti.

    • @johntony366
      @johntony366 3 ปีที่แล้ว +101

      @@catholic_zoomer_bro Well today .Net Core 6 absolutely stomps on Java, so better hold on to your jobs Java devs!

    • @Stuntman5701
      @Stuntman5701 3 ปีที่แล้ว +77

      @@catholic_zoomer_bro sadly java is literal garbage.

  • @TejoAgus
    @TejoAgus 3 ปีที่แล้ว +15

    My favorite language! I'm always trying to learn the cool new thing, but keep coming back to C#. It may be more verbose than others like Python or Ruby, but it is so elegant, easy to read and intuitive that it is totally worth it.

  • @HurikaneTv
    @HurikaneTv 3 ปีที่แล้ว +4

    Half the time I have no idea what you are talking about but I will always watch the whole 100 seconds

  • @rayzhang3425
    @rayzhang3425 3 ปีที่แล้ว +3

    From never having looked into C# beyond its name, this was very helpful! Thank you for the overview, highlights, and context compared to other similar languages!

  • @zeckul
    @zeckul 3 ปีที่แล้ว +201

    1:22 Nowadays most C# programmers would write `var hello = "string";` (equivalent of `let` in Typescript)
    1:32 It would have been nice to use C# 10 syntax for namespaces (e.g. no brackets).
    1:39 Finalizers are not invoked when objects go out of scope. The closest thing to scope-based resource management is `using`/IDisposable. Finalizers are invoked non-deterministically once an object is eligible for garbage collection (which is only tangentially related with scope). It's unfortunate that they used syntax resembling C++ destructors, because this has been a common misconception ever since.
    1:52 C# does have top-level functions, albeit for the specific use case of small programs that are held in a single file.

    • @WonderfulPlays
      @WonderfulPlays 3 ปีที่แล้ว +8

      Agreed with all of the above.

    • @kopuz.co.uk.
      @kopuz.co.uk. 3 ปีที่แล้ว +13

      1. no
      2. no
      3. sounds lazy
      4. your point?

    • @antoniojohnson7693
      @antoniojohnson7693 3 ปีที่แล้ว +14

      I only use "var" for types that aren't primitives or strings.

    • @michawhite7613
      @michawhite7613 3 ปีที่แล้ว +38

      @@kopuz.co.uk. As a C# developer, I've never seen anyone who doesn't use "var"
      And what are you being all snarky for with #4? It says in the video that there are no top-level functions and this person is correcting that

    • @douglasdavid177
      @douglasdavid177 3 ปีที่แล้ว +17

      Why on Earth would people intentionally use var? I do not understand this. One of the biggest advantages of C sharp is that it’s statically typed. Like how typescript is an upgrade from JavaScript because it’s statically typed. Using “var” instead of the actual type is just lazy and makes it significantly harder and more frustrating for your teammates to read your code later (as well as your future self). Am I missing something?? Using the actual types makes it way easier to understand what you are doing in the first place

  • @rickross-z3j
    @rickross-z3j หลายเดือนก่อน +2

    After almost 20 years of C# I have come up with a rap for how this language can be interpreted. That is what programming has become for me.

    • @rickross-z3j
      @rickross-z3j หลายเดือนก่อน +1

      rap csi 101
      hold your keyboard while we retort
      checking requirements like a sniper
      grab these work items, or return to the backlog
      few are good lets go and roll, to sprint number two
      why cuz we are behind let that sink in scrum master
      move work to programmer
      programmer work
      do work
      move work to programmer
      programmer work
      do work
      move work to programmer
      programmer work
      do work
      create PR for thats how we are
      feedback holla 22 comments thats how we do
      fix that PR maybe even send a message before you do
      get clarification is what we do
      check it in one hundred percent test proof
      get that approved, yo yo yo
      move branches like oceans to gen the cab
      we do we do commit to cab 002
      deploy the code as we implode if any 404
      wise proof backup no problem git commit
      site 200 aOk relay echo

    • @ismailqamar625
      @ismailqamar625 2 วันที่ผ่านมา

      @rickross-z3j This is nothing short of incredible!

    • @ismailqamar625
      @ismailqamar625 2 วันที่ผ่านมา

      @ismailqamar625 agreed!

  • @jammincoder
    @jammincoder 3 ปีที่แล้ว +25

    I've been thinking about getting into C# for a while now, this just encourages me to do so even more. Next time I have free time I will!
    Cool video, BTW 😎

  • @anasalbadi1792
    @anasalbadi1792 9 หลายเดือนก่อน

    I literally spent like two months now trying to learn C#, and this guy just summarized it in 100 seconds! AMAZING

  • @Bliss467
    @Bliss467 3 ปีที่แล้ว +113

    Pretty sure c# has top level functions in the latest version. Plus they added file scoped namespaces. It's really nice to not have so much indentation now.

    • @zokocx
      @zokocx 3 ปีที่แล้ว +9

      Top level functions are added in previous release (C# 9.0 .NET 5).
      File scoped namespaces are added in latest version C# 10.0 .NET 6 (supported in VS 2022 and Rider IDE).

    • @paulogodinho3275
      @paulogodinho3275 3 ปีที่แล้ว +5

      I think the video is a bit outdated if we get a little picky, but it is awesome nonetheless :D

    • @theshermantanker7043
      @theshermantanker7043 2 ปีที่แล้ว +3

      It only has that for the main method, not any arbitrary one

    • @yigitbulut4972
      @yigitbulut4972 2 ปีที่แล้ว

      Wdym it does

    • @Bliss467
      @Bliss467 2 ปีที่แล้ว

      @@theshermantanker7043 yeah which is disappointing to realize because it seems easy for the compiler to wrap all the top level code in a file in a generated static class similarly to how kotlin does it for the jvm

  • @nort5396
    @nort5396 3 ปีที่แล้ว +18

    Personally, a Unity tutorial would be so helpful! I've also wanted to build games, but current Unity tutorials are just so overwhelming. I hope you decide to make one. It would help so many aspiring game developers just like me!

    • @FelineRaptor-gv4te
      @FelineRaptor-gv4te 3 ปีที่แล้ว +1

      same with me

    • @Katt1n
      @Katt1n 3 ปีที่แล้ว +16

      Not sure what tutorials you are looking at, there is almost a redundancy of Unity tutorials on the web.

    • @sjoerdev
      @sjoerdev 2 ปีที่แล้ว +5

      Watch brackeys

    • @joaovitorreynaldo
      @joaovitorreynaldo 2 ปีที่แล้ว +1

      Watch Code Monkey. It's one of if not the best channel about Unity and programming in general.

  • @Stabruder
    @Stabruder 3 ปีที่แล้ว +7

    Finally, Im waiting for this for so long, thanks!

  • @SpiritVector
    @SpiritVector ปีที่แล้ว +2

    Easy and nice language to use man. Smooth as butter!

  • @TheKurama9
    @TheKurama9 3 ปีที่แล้ว +228

    1:25: Strings can be null without the ?. Only value types need that question mark to be nullable.

    • @thatKurtis
      @thatKurtis 3 ปีที่แล้ว +38

      but the compiler now warns with the relatively new nullable reference type feature

    • @Fireship
      @Fireship  3 ปีที่แล้ว +78

      Good call, thank you for the correction.

    • @TheKurama9
      @TheKurama9 3 ปีที่แล้ว +7

      @@thatKurtis Oh interesting, I didn't know that. wikipedia says it's been around since C# 8, so I've ignored that warning since 2019 lmao. Thanks for pointing it out!

    • @gideonunger7284
      @gideonunger7284 3 ปีที่แล้ว +15

      ​@@Fireship the correction is incorrect.
      nullable reference types is the default for new projects now. so a default project would not allow string to be null. (albeit only emitting a warning for it)

    • @jackkendall6420
      @jackkendall6420 3 ปีที่แล้ว +11

      @@TheKurama9 It only became the default very recently - previously you had to opt-in.

  • @IkeVictor
    @IkeVictor 3 ปีที่แล้ว +4

    i love this type of coding youtube content. It's the type of content i would love to make if I had the time. EXTREMELY concise and dense content on particular CS subject matter... keep it up

  • @jackkendall6420
    @jackkendall6420 3 ปีที่แล้ว +34

    Some comments based on the C# code seen in the vid:
    1. While you can write finalizers/destructors for types in C#, it's not very common and not very useful. Due to how garbage collection works, you can't ever count on a finalizer being called. If you need to do something to deallocate special resources (like a file handle or a database connection) you'd implement the IDisposable interface on the class instead.
    2. When writing asynchronous code, try to avoid writing 'async void' functions as much as possible! Async void will break the exception-handling system of .NET. Instead, declare async methods as returning Task. (e.g. 'public async Task MyCoolAsyncMethod()')

    • @plrc4593
      @plrc4593 3 ปีที่แล้ว

      What are asynchronous code and functions?

    • @jackkendall6420
      @jackkendall6420 3 ปีที่แล้ว +3

      @@plrc4593 Async code is any method that has the 'async' modifier. Async code is usually used to perform long-running operations (like I\O) in a way that doesn't block the rest of the app.

    • @plrc4593
      @plrc4593 3 ปีที่แล้ว

      @@jackkendall6420 I\O? Input/output?

    • @jackkendall6420
      @jackkendall6420 3 ปีที่แล้ว +3

      @@plrc4593 Correct, yeah. Stuff like writing to a file or making a request to a website.

    • @dmiradakis
      @dmiradakis 2 ปีที่แล้ว

      Love your mention of IDisposable. IDisposable + a scoped Using statement = happiness.

  • @gugufortunia
    @gugufortunia ปีที่แล้ว +1

    I learned so much from this 100 seconds video.i would love to see more C#

  • @robertwallace5498
    @robertwallace5498 3 ปีที่แล้ว +11

    I used to love working in c# when I made some small demo games in Unity. And since it is similar to java, making that transition for my new company was not so bad

  • @lukahietala2550
    @lukahietala2550 2 ปีที่แล้ว +3

    I learned some much from just watching this 100 seconds long video. I would love to see more C# related content, because you can explain all your topics so well.

  • @123wazoo
    @123wazoo 3 ปีที่แล้ว

    Fireship, I love your videos. Not only do you talk about the language, but you quickly highlight some key modules/frameworks that people use.

  • @dustinmorrison6315
    @dustinmorrison6315 3 ปีที่แล้ว +25

    Also, connecting C# to SQL server is amazingly powerful and not too hard. I didn't know what LINQ was until I watched this. Thanks!

    • @roccociccone597
      @roccociccone597 ปีที่แล้ว +2

      it's a shame that sql server sucks

  • @MathGeekQ
    @MathGeekQ 3 ปีที่แล้ว +1

    Yes yes yes to a full .NET and Unity tutorial!

  • @aggy69420
    @aggy69420 3 ปีที่แล้ว +4

    C# is one of my favourite programming languages. So good.

  • @Ararira00
    @Ararira00 3 ปีที่แล้ว +2

    Unity Tutorial! I love your fast, easy to digest and straight to the point format.

  • @viccie211
    @viccie211 3 ปีที่แล้ว +8

    I've been writing C# daily for the last five years and I love the language a lot! I was waiting for this episode for a while now.

    • @dhirajdeore434
      @dhirajdeore434 ปีที่แล้ว

      can u pls tell which other languages do u knw and how c sharp is diff or better than them in ur opinion ...just asking out of curiosity u can answer briefly

  • @bhavishyachandra
    @bhavishyachandra 3 ปีที่แล้ว +1

    My favorite channel featuring my favorite language 💯❤️

  • @bertik2326
    @bertik2326 3 ปีที่แล้ว +37

    I'd love to see a full .NET tutorial, altho I have experience with Unity I never really understood C#. And I haven't seen a good basic C# 101 tutorial.

    • @DerekWelton
      @DerekWelton 3 ปีที่แล้ว +8

      Take a look at Tim Corey's channel. He is probably the best c# instructor out there.

    • @xiaonile
      @xiaonile 3 ปีที่แล้ว +3

      Seconding with Tim Corey's channel on C# and .Net stuff.

  • @BubkisLord
    @BubkisLord ปีที่แล้ว +2

    C# is literally the best. Also the documentation is very good. :)

  • @sa_ad
    @sa_ad 2 ปีที่แล้ว +1

    i learnt this language for unity from brackeys and he was an awesome teacher hats off to him

  • @thatKurtis
    @thatKurtis 3 ปีที่แล้ว +53

    Reference types can still be null even with the nullable reference type feature enabled, but you get warnings in most scenarios
    it's not a destructor but a finalizer, and you have no way of knowing when or even if it gets called at all, since it is called when the garbage collector decides it want's to get rid of that object after it is no longer in use. The closest thing to a destructor is Dispose in combination with using which you get through the IDisposable interface.
    Also, when you use async/await you almost always want to have Task or variations thereof as your return type and not void :)

    • @Bliss467
      @Bliss467 3 ปีที่แล้ว

      You can force things to be deleted with the "using" keyword or calling gc.collect on them.

    • @thatKurtis
      @thatKurtis 3 ปีที่แล้ว +4

      @@Bliss467 a using statement calls Dispose on an object after it leaves the scope but does not directly call the finalizer
      GC.Collect() will force a garbage collection of all generations so that might trigger the finalizer if the object was marked for deletion

    • @lucass8119
      @lucass8119 3 ปีที่แล้ว +3

      @@thatKurtis I think using the term "destructor" in C# is so misleading, because it sounds like C++ destructor semantics but object destruction is completely different in C#.
      I personally find when working with Java/C# instead of C++ I miss the deterministic object deletion. It can really come in handy for debugging to know exactly when and how an object is going to be destroyed. But hey, thats just an unfortunate limitation of garbage collected languages.

    • @yonderalt2662
      @yonderalt2662 2 ปีที่แล้ว

      All of this. 100%

    • @yonderalt2662
      @yonderalt2662 2 ปีที่แล้ว

      @@lucass8119 But "Destructor" makes sense because it is in fact, the opposite of the "Constructor". It happens when the GC destructs the object. The difference is, the GC destructs it, not you. Which is why it is unpredictable.
      If it were called "Finalizer" then that makese the term 'finally' in try catch to not make sense, because finally in try catch is a 'finalizer' ergo code that runs regardless of the end result (except for Exceptions). A destructor does not match that behavior, so the term "finalizer" doesn't make sense.

  • @robertkylethomas173
    @robertkylethomas173 3 ปีที่แล้ว +1

    These have become a part of my morning routine while I'm drinking my coffee. Absolutely love these.

  • @jawadsrour8490
    @jawadsrour8490 3 ปีที่แล้ว +43

    Great content, as always!!
    Please do a Django, Flask, or ExpressJS in 100 seconds!!

  • @abdelrhmanhashem3256
    @abdelrhmanhashem3256 ปีที่แล้ว

    you have real mem talent man i love your passive humor it kills me, and thanks for the video that was also helpful.

  • @TheNorthRemember
    @TheNorthRemember 3 ปีที่แล้ว

    this channel is one of 5 best channels i follow , now it's the best

  • @Parkuman
    @Parkuman 3 ปีที่แล้ว +20

    A Blazor course would be sweet! It leverages WebAssembly under the hood and would be cool to see :)

    • @YassaTaiseer
      @YassaTaiseer 3 ปีที่แล้ว +1

      I have a 4 part Blazor WASM video series if thats something you might be interested in.

    • @Parkuman
      @Parkuman 3 ปีที่แล้ว +1

      @@YassaTaiseer I'll check it out right now! thanks

    • @YassaTaiseer
      @YassaTaiseer 3 ปีที่แล้ว

      @@Parkuman thanks much appreciated

  • @RandomDude889
    @RandomDude889 3 ปีที่แล้ว +1

    Let's GOOOOOOOOOOOO!!
    This is the one I've been waiting for! It's finally here! :D

  • @neltins5308
    @neltins5308 3 ปีที่แล้ว +3

    C# really exploded in popularity among developers I know in the past 3 years, its crazy

  • @anastaskostov7859
    @anastaskostov7859 ปีที่แล้ว +1

    I greatly appreciated the simplicity of C# when I started learning Rust

  • @VuLinhAssassin
    @VuLinhAssassin ปีที่แล้ว +3

    As someone who had worked in Java, transition to C# is easy.

  • @Rovsau
    @Rovsau 2 ปีที่แล้ว

    YES, I want that .Net video.
    Specifically, there is no video outlining the difference between 2.0 Standard and 4x Framework.
    Bonus points for Unity-related info.

  • @JXQU3
    @JXQU3 ปีที่แล้ว +3

    C# now with .NET 7 can also compile directly to native AOT (machine code) like C, Rust or Go.

  • @fieryscorpion
    @fieryscorpion ปีที่แล้ว +2

    My favorite language. Thank you for creating this video!

  • @carlosjosejimenezbermudez9255
    @carlosjosejimenezbermudez9255 3 ปีที่แล้ว +8

    Destructors are a thing, but a much more common one is the usage of the disposable pattern for elements that need it.

  • @susmitislam1910
    @susmitislam1910 3 ปีที่แล้ว +1

    I got near vision problems so I went to the doc. He gave me glasses so I could C#.

  • @cruz1ale
    @cruz1ale 2 ปีที่แล้ว +7

    I would love to see these 100 seconds videos about new major versions of technologies. Basically a rundown of what's new in the major verison. For example, in a .NET 6 in 100 seconds video, you could talk about the support for global usings and the minimal hosting model.

  • @adithyanbharat4372
    @adithyanbharat4372 3 ปีที่แล้ว +1

    Wow .you quality is way over the top..

  • @StuckDuck
    @StuckDuck 3 ปีที่แล้ว +4

    C# is just as fast as me clicking your notifications

  • @luiseduardogonzalezquiroz272
    @luiseduardogonzalezquiroz272 3 ปีที่แล้ว +2

    More C# / .NET6 related content would be awesome!!!

  • @RealDaveWinter
    @RealDaveWinter ปีที่แล้ว +12

    0:43 this is no longer correct. Microsoft's IL2CPP compiler, which is part of visual studio, generates native code with no interpreter anymore. The execution speed is equal to anything created by C++

  • @pasan6209
    @pasan6209 3 ปีที่แล้ว +2

    I would love to see full DOTNET series from you ✌

  • @JonWood
    @JonWood 3 ปีที่แล้ว +4

    As a 10 year C# veteran, you have done the language proud. Thank you for showing C#. Is F# next? :)

  • @eig5203
    @eig5203 2 ปีที่แล้ว +2

    alternative script:
    "Write some java. That's how to write a C# program."

  • @Darkxelblack
    @Darkxelblack 3 ปีที่แล้ว +3

    I started with C# a year ago and love it. I would love to see a tutorial on something modern, maybe game or so?

  • @zoidenvoid
    @zoidenvoid ปีที่แล้ว

    i learned more from this guy in 100 seconds than my proffesor in 2 months

  • @tonfilm
    @tonfilm 3 ปีที่แล้ว +17

    FYI, the free and open-source game engine Stride is, unlike Unity, completely written in C# and a game project is also a C# solution file... Quite amazing when you are a C# developer.

  • @Temon0942
    @Temon0942 10 หลายเดือนก่อน

    I usually watch your videos while I am in washroom and I love it.

  • @phucnguyen0110
    @phucnguyen0110 3 ปีที่แล้ว +4

    Please do a full course Jeff, thank you!

  • @alejo880519
    @alejo880519 2 ปีที่แล้ว +1

    Awesome content man, if you can post more on C# that would great.

  • @codingpeanuts
    @codingpeanuts ปีที่แล้ว +3

    C# - the unsung hero of coding languages. Sure, it might not be the 'it' choice for startups, but its robustness, updated features, and amazing community make it a rockstar in its own right.

    • @reddragon2358
      @reddragon2358 ปีที่แล้ว +1

      Agreed. Also do not forget its exceptional versatility.

  • @tothemoon7438
    @tothemoon7438 3 ปีที่แล้ว

    Beginners, who thought they'll instantly understand the whole c# in a few minutes:
    Understandable, have a nice day

  • @quachhengtony7651
    @quachhengtony7651 ปีที่แล้ว +3

    .NET 8 is coming, and I feel a storm brewing

  • @dropsonic
    @dropsonic 3 ปีที่แล้ว

    Have been using C# for ten years but still watched this video, just in case, that's how awesome these videos are!

  • @nickchapsas
    @nickchapsas 3 ปีที่แล้ว +26

    You should have reached out to a C# expert to sanity check the script of the video. There is quite a bit of misinformation in here.

    • @C4Oc.
      @C4Oc. 3 ปีที่แล้ว +4

      The goat himself is here!

    • @MsKpg
      @MsKpg 3 ปีที่แล้ว

      Colab? 👀

    • @DanWalshTV
      @DanWalshTV 3 ปีที่แล้ว

      👌

  • @Jaracara11
    @Jaracara11 2 ปีที่แล้ว +2

    C# will always be my favorite programming language

  • @saikarumudi
    @saikarumudi 2 ปีที่แล้ว +4

    Can you do .NET in 100 seconds and Blazor in 100 seconds ? I hear people working on it but never understood clearly what it does

  • @syedasim6813
    @syedasim6813 3 ปีที่แล้ว +1

    I am using C# since last 10 years and I love it

  • @mobwow6833
    @mobwow6833 2 ปีที่แล้ว +9

    Well, starting today I'll be learning how to code starting with C#. Wish me luck lol.

    • @daurham
      @daurham 2 ปีที่แล้ว

      How’s it going?

    • @mobwow6833
      @mobwow6833 2 ปีที่แล้ว +1

      @@daurham Well, save to say I didn't practice as much in my free time as I wished. But I'm doing a short internship at a local software company right know.
      And if they decide to take me in, I'll be starting an apprenticeship to become a Software Developer later this year.
      They are primarely working in C# aswell, so that would be very fitting.

    • @1337AceOfSpades1337
      @1337AceOfSpades1337 2 ปีที่แล้ว

      @@mobwow6833 How's it going?

    • @hkn5539
      @hkn5539 2 ปีที่แล้ว

      Have you learned the basics?! Please tell us the truth!

    • @mobwow6833
      @mobwow6833 2 ปีที่แล้ว

      @@hkn5539 In my other reply I talked about the internship I was doing doing and yea I learned the basics while being there. I will be doing an apprenticeship at the same company starting in August this year, and they also hired me to work for them in the meantime. Got my first day on the 16th this month, so I will be learning a lot more about programming in the upcoming months. :)

  • @Clematisch
    @Clematisch 3 ปีที่แล้ว

    I just started to learn Python and TH-cam is now recommending me videos about programming. I watched this video and I my brain just blew up.

  • @Apollo1_
    @Apollo1_ 3 ปีที่แล้ว +86

    Would love a .net course, can’t find many learning sources and there’s so many uses for c# it’s hard to know where to start

    • @PaulStickman
      @PaulStickman 3 ปีที่แล้ว

      Hi, can you please name a few real world examples where C# is used? and if you could tell would kind of C# developer jobs are out there, would be awesome

    • @babatona
      @babatona 3 ปีที่แล้ว +6

      I recommend going to bro code youtube channel and using his c# tutorial it's honestly good

    • @babatona
      @babatona 3 ปีที่แล้ว

      @@PaulStickman obviously windows desktop development and theres many jobs because even in my small country c# is used

    • @Apollo1_
      @Apollo1_ 3 ปีที่แล้ว

      @@babatona thanks for the tip! Will be sure to check it out

    • @haha-hk9tx
      @haha-hk9tx 3 ปีที่แล้ว +1

      Check out the C# discord for best guidance :)

  • @optimuspower92
    @optimuspower92 3 ปีที่แล้ว

    i learned more about the basics of programming from this 100 seconds than i ever did trying to teach myself

    • @BenPotts
      @BenPotts 3 ปีที่แล้ว

      how is this 100 seconds

  • @speyck
    @speyck 3 ปีที่แล้ว +5

    1:46 please use syntax `Superhuman : Humanoid` with an extra space before the colon. C# conventions…

  • @sudhanshubhagat6503
    @sudhanshubhagat6503 3 ปีที่แล้ว +5

    Finally!! the C# is here :) We would love to see more of .NET eco system videos

  • @wlockhart
    @wlockhart 3 ปีที่แล้ว +2

    Love these videos. I'd be thrilled to see 300 second versions of them.

  • @Kaniggel_
    @Kaniggel_ 3 ปีที่แล้ว +20

    For me C# was the easiest language to learn and it makes so much fun programming with it.
    Love the Syntax, Visual Studio IDE and everything else.

  • @RHV044
    @RHV044 ปีที่แล้ว +19

    The discussion C# vs Java doesn't make sense anymore, c# is objectively better basically because it has evolved and its not the same language it was 10 years ago. If you focus on performance the gap is so fucking big that it's almost humiliating

    • @onepiece07-hl4hj
      @onepiece07-hl4hj หลายเดือนก่อน

      C# is more performant than java?

  • @CSharpHub
    @CSharpHub 3 หลายเดือนก่อน +1

    This is a great video.
    Congratulations! 👍👍👍

  • @randomly_random_0
    @randomly_random_0 3 ปีที่แล้ว +3

    C# is the language we use in our company in my first job. At first I hated it because I don't wanna learn it because I'm comfortable with PHP and Javascript and I don't want to deal with syntax-y, statically-typed languages with OOP lol.
    My first project was a textblast system and I immediately loved it when I got used to it.

    • @vibovitold
      @vibovitold ปีที่แล้ว +1

      Coincidentally, I also used C# and PHP in my first job as well (2011-2014).
      PHP, especially back then, was a mess.
      I frankly have no idea how someone could have preferred it over C#.
      What had probably contributed to my impression was that the PHP codebase at that place was of poor quality.
      This wasn't necessarily PHP's inherent fault, although I feel that in the long run, code quality IS correlated with language quality.
      You can spurn shitty code in every language, but some languages make this easier than others. C# did a much better job in encouraging clean design, in my opinion.
      Of course this was several years ago; I'm hearing that PHP has made a lot of progress since, addressing a large portion of criticism.

    • @supercyclone8342
      @supercyclone8342 ปีที่แล้ว

      @@vibovitold C# dev here! I was somewhat considering learning PHP, but I only really heard bad things about it so that's good to know

  • @NishanCW
    @NishanCW 3 ปีที่แล้ว +1

    Have been waiting for this. Need a Unity tutorial. ♥️

  • @rikschaaf
    @rikschaaf 3 ปีที่แล้ว +22

    134 seconds, since you start your explanation at the first second and are done at 2:14.
    Seriously though, it seems that C# has a better, less verbose way of dealing with null-safe programming and getters/setters, without having to use to resort to things like Lombok. Also WAsm support for blazor is pretty cool. Way more mature than the WAsm support in Java. And this all coming from a Java developer. I should take another look at C# sometime in the future.