C# in 100 Seconds

  Рет қаралды 2,111,779

Fireship

Fireship

Күн бұрын

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 700
@somedevstuff5060
@somedevstuff5060 2 жыл бұрын
How to create a successful indie game that makes alot of money in 100 seconds
@sergsergesrgergseg
@sergsergesrgergseg 2 жыл бұрын
in 30 years
@lastidea4925
@lastidea4925 2 жыл бұрын
LMAO keep believe that boi
@user-wc1sm8cj8s
@user-wc1sm8cj8s 2 жыл бұрын
More like "Building a Unicorn Start-up in 100 seconds"
@barigamb
@barigamb 2 жыл бұрын
@@user-wc1sm8cj8s Ben Awad would like to know your address.
@user-wc1sm8cj8s
@user-wc1sm8cj8s 2 жыл бұрын
@@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 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
@@driedurchin you rlly just compared C# and rust... lol k
@ysammo214
@ysammo214 2 жыл бұрын
This makes me feel so much better about learning it
@Kokurorokuko
@Kokurorokuko 2 жыл бұрын
@@KookoCraft no, they compared C#'s documentation and Rust's documentation.
@MechMK1
@MechMK1 2 жыл бұрын
It should be noticed that destructors are very uncommon in C#, unlike C++.
@plrc4593
@plrc4593 2 жыл бұрын
Because C# is more high level and has garbage collector.
@TabooRetka701
@TabooRetka701 2 жыл бұрын
Yep, in c++ you have to manually control lifetime of aggregates
@waffle8364
@waffle8364 2 жыл бұрын
deconstructors are uncommon in most languages
@sp00l
@sp00l 2 жыл бұрын
I've been using C# to program games for 5 years now and I had no idea C# had destructors, haha.
@plrc4593
@plrc4593 2 жыл бұрын
@@sp00l Hehe. Did you use Unity or something else?
@rico993
@rico993 2 жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
you just described Java Script😂
@captainvaughn5692
@captainvaughn5692 11 ай бұрын
the only difference is that javascript is a weird mess of things that shouldn't... be were they are@@larin1327
@hallrules
@hallrules 10 ай бұрын
@@larin1327 except its not trash
@81NARY
@81NARY 2 жыл бұрын
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 2 жыл бұрын
is .net 6 live rn?
@81NARY
@81NARY 2 жыл бұрын
@@nameless4086 Yep since Nov 10th.
@WonderfulPlays
@WonderfulPlays 2 жыл бұрын
Are the discriminated unions really planned sooned? Or more like we would like to do it eventually, but nobody knows when?
@haxi52
@haxi52 2 жыл бұрын
Nullable value types were introduced in C#2, and nullable reference types (to enforce the opposite) in C#8
@81NARY
@81NARY 2 жыл бұрын
@@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.
@neltins5308
@neltins5308 2 жыл бұрын
C# really exploded in popularity among developers I know in the past 3 years, its crazy
@tylersustare
@tylersustare 2 жыл бұрын
C# is pretty great ♥️ I do love the journey from proprietary Microsoft nonsense to what it is today. Also Ruby in 💯 🙏
@duckonaroll1913
@duckonaroll1913 Жыл бұрын
open source microsoft my beloved
@klekaelly
@klekaelly 2 жыл бұрын
C# is my favorite language. The dotnet framework is awesome.
@fieryscorpion
@fieryscorpion Жыл бұрын
My favorite language. Thank you for creating this video!
@harveylawrence9601
@harveylawrence9601 11 ай бұрын
Can you make a C# for web dev?
@sriramiyer9840
@sriramiyer9840 2 жыл бұрын
Make a prolog in 100 seconds vid. It's such an awesome language. U'll love it
@Apollo1_
@Apollo1_ 2 жыл бұрын
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
@CRonaldoLTU
@CRonaldoLTU 2 жыл бұрын
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 2 жыл бұрын
I recommend going to bro code youtube channel and using his c# tutorial it's honestly good
@babatona
@babatona 2 жыл бұрын
@@CRonaldoLTU obviously windows desktop development and theres many jobs because even in my small country c# is used
@Apollo1_
@Apollo1_ 2 жыл бұрын
@@babatona thanks for the tip! Will be sure to check it out
@haha-hk9tx
@haha-hk9tx 2 жыл бұрын
Check out the C# discord for best guidance :)
@sayeddileri3461
@sayeddileri3461 2 жыл бұрын
"C hashtag" -We Know Who.
@madhatter2744
@madhatter2744 2 жыл бұрын
a comparison creating the same web app with blazor vs nodejs & js framework would be AMAZING
@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.
@abh1yan
@abh1yan 2 жыл бұрын
Elixir and Phoenix Framework please.
@williamfarris796
@williamfarris796 2 жыл бұрын
As a C# shill I'd like to point out that it invented async await syntax.
@zyriab5797
@zyriab5797 2 жыл бұрын
I used to dev in Unity and web backend in C# and I loved it. Before that I was mostly programming in C++ and a bit of C for embedded microcontrollers (PIC32) and the like. Today I'm programming in JS/Node with React and although it's very nice I really miss the C-like syntax, function overloading and strong typing (yes yes planning on moving towards TypeScript soon but it's not as sexy as C-like syntax). Thanks for the nostalgic video :D
@dhirajdeore434
@dhirajdeore434 Жыл бұрын
type in rust ypu will get plenty of your desires fulfilled i mean ur c like syntax thingy...
@zyriab5797
@zyriab5797 Жыл бұрын
@@dhirajdeore434 Hey, I got a job in TypeScript since then, I'm quite happy with the work but planning on working on some project in embedded C and C++. I will check Rust and Zig at some point, indeed :)
@senzmaki
@senzmaki 2 жыл бұрын
This is actually nutty I just started learning Unity today
@gd-xk4rr
@gd-xk4rr 8 ай бұрын
most helpful video ever bro i did not know how to download c# until this
@arcane3943
@arcane3943 2 жыл бұрын
I've been waiting for this one
@dmitryn9090
@dmitryn9090 2 жыл бұрын
Full Unity would be much appreciated!
@agsenti5523
@agsenti5523 2 жыл бұрын
Took me a second to realize that this video is not going to be a C# note/pitch playing for 100 seconds
@gppproton
@gppproton 2 жыл бұрын
A blazor c# or Maui tutorial will be nice
@electromyogram1527
@electromyogram1527 Жыл бұрын
these are the only tutorials where I have to slow the video down instead of speed it up
@SolidSnake2025
@SolidSnake2025 2 жыл бұрын
And with net 6 and c# 10. No need for programm class and main method. Also minimal apis are awesome. Net developer since 2004.
@skshahnawaz-ulhaque
@skshahnawaz-ulhaque 2 жыл бұрын
I'm into C# development since the beginning of my career and have no intention to switch to any other languages except for some specific requirements. It was and is the better version of Java. C# is pure love. Long live C#!!
@pixel7038
@pixel7038 2 жыл бұрын
Gotta give some love for Rust my good friend ;)
@rubbish9231
@rubbish9231 2 жыл бұрын
If you haven't worked on java then how do you know its better than java? Religion ye
@skshahnawaz-ulhaque
@skshahnawaz-ulhaque 2 жыл бұрын
@@rubbish9231 I have done professional coding in Java too :)
@yonderalt2662
@yonderalt2662 Жыл бұрын
@@pixel7038 If you are used to C++ sure. I'd go for Go if you are used to C
@justwatching6118
@justwatching6118 2 жыл бұрын
C# - My favorite programming language ❤❤❤
@retrokoh
@retrokoh 2 жыл бұрын
A Brock Lesnar reference in a C# video. Why yes, I did like that.
@blazi_0
@blazi_0 2 жыл бұрын
Also this language is famous as a link between programmers and musicians
@potatony997
@potatony997 2 жыл бұрын
My mind is expanding at an alarming rate
@edevaldosilva3104
@edevaldosilva3104 2 жыл бұрын
Great content as always man. Unity tutorial here we go!!
@alexlungu7777
@alexlungu7777 2 жыл бұрын
I would love to see a full course about C# 10/11 and unity 2022
@diegoalaniz3244
@diegoalaniz3244 2 жыл бұрын
I came expecting a constant ringing noise consisting of C#
@lourencolage2948
@lourencolage2948 2 жыл бұрын
If you do a unity tutorial I will become a PRO member ASAP
@8koi245
@8koi245 2 жыл бұрын
I just reached functions by my own in college, was doing some more stuff so I couldn't play around more, I had no idea you can create web pages whit that!
@Cargren18
@Cargren18 24 күн бұрын
C# is one of the only few nice things made by Microsoft mainly because C# is Open Source , even VS Code is not completely open source which is why VS Codium exists.
@billkammermeier
@billkammermeier 2 жыл бұрын
I believe you made a typo. The IL interpreter is the CLI. You put CIL in your graphic which I guess was your mind combining the two
@DrathVader
@DrathVader 9 ай бұрын
Legally distinct Java
@typingtext1
@typingtext1 4 ай бұрын
thanks!! so much info conveniently :)
@isnull_or_empty
@isnull_or_empty 2 жыл бұрын
.NET 6 doesn't require a class to be wrapped in namespace anymore.
@stendaneel4879
@stendaneel4879 2 жыл бұрын
i've been coding in C# for 4 years now, I've learned 2 things from this video... a video of 100 seconds...
@arwahsapi
@arwahsapi 2 жыл бұрын
Microsoft did a brilliant strategy to gain momentum by bundling C# with Unity. Otherwise its use will be limited only to corporate projects and will die slowly.
@ballsdeepinside69
@ballsdeepinside69 2 жыл бұрын
I speeded up video to 2x and learned c# in 50 seconds
@haresmahmood
@haresmahmood 2 жыл бұрын
C# is just really comfortable to work with imo - it's always felt like the better version of Java to me
@khodis2002
@khodis2002 2 жыл бұрын
Yeah, it has so many features and I can't think without them in Java.
@michawhite7613
@michawhite7613 2 жыл бұрын
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 2 жыл бұрын
Java is fucking garbage tbh.
@meceffeukada3767
@meceffeukada3767 2 жыл бұрын
I've used both and for me Java is always my choice except for web
@user-ge2vc3rl1n
@user-ge2vc3rl1n 2 жыл бұрын
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.
@shivankacker
@shivankacker 2 жыл бұрын
Instructions unclear, I still cant see clearly
@chalk1007
@chalk1007 Жыл бұрын
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 11 ай бұрын
Spanish is prob a better second language lol
@pointyorb
@pointyorb 10 ай бұрын
​@@amogus7153Spanish is my favorite coding language
@RavishPhotosKatochPhotos
@RavishPhotosKatochPhotos 5 ай бұрын
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-fs1pb
@Rick-fs1pb 5 ай бұрын
@@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-fs1pb
@Rick-fs1pb 5 ай бұрын
@@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:
@nickchapsas
@nickchapsas 2 жыл бұрын
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. 2 жыл бұрын
The goat himself is here!
@MsKpg
@MsKpg 2 жыл бұрын
Colab? 👀
@DanWalshTV
@DanWalshTV 2 жыл бұрын
👌
@RealDaveWinter
@RealDaveWinter Жыл бұрын
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++
@peterhuijsen
@peterhuijsen 2 жыл бұрын
Would love to see a C# tutorial for blazor web apps, seems like good stuff.
@knowiz8071
@knowiz8071 2 жыл бұрын
Follow Tim Cory for that kind of content. He's one of the best on KZbin.
@Noitcereon
@Noitcereon 2 жыл бұрын
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#
@TheKurama9
@TheKurama9 2 жыл бұрын
1:25: Strings can be null without the ?. Only value types need that question mark to be nullable.
@thatKurtis
@thatKurtis 2 жыл бұрын
but the compiler now warns with the relatively new nullable reference type feature
@Fireship
@Fireship 2 жыл бұрын
Good call, thank you for the correction.
@TheKurama9
@TheKurama9 2 жыл бұрын
@@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 2 жыл бұрын
​@@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 2 жыл бұрын
@@TheKurama9 It only became the default very recently - previously you had to opt-in.
@MZZenyl
@MZZenyl Жыл бұрын
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).
@chadkrause4694
@chadkrause4694 2 жыл бұрын
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 2 жыл бұрын
Such a Chad thing to say!
@marcs9451
@marcs9451 2 жыл бұрын
You might enjoy Go if you like easy multi threading
@andromedarealm3776
@andromedarealm3776 2 жыл бұрын
@@marcs9451 NO! Please stop
@iqbaltaufiq17
@iqbaltaufiq17 2 жыл бұрын
@@andromedarealm3776 why?
@thedragonrises6882
@thedragonrises6882 2 жыл бұрын
@@marcs9451 goroutines are love!
@dansanger5340
@dansanger5340 2 жыл бұрын
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.
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 2 жыл бұрын
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 2 жыл бұрын
@ 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
2 жыл бұрын
@@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 2 жыл бұрын
@ 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.
@Rohit-nn9ky
@Rohit-nn9ky 2 жыл бұрын
Finally!! A well designed language like C# should have featured earlier... But better late than never !
@gmxipt
@gmxipt 2 жыл бұрын
Found the C# dev
@catholic_zoomer_br
@catholic_zoomer_br 2 жыл бұрын
Of course it's well designed, it was designed as a Java clone :)
@divinsmathew
@divinsmathew 2 жыл бұрын
@@catholic_zoomer_br poda patti.
@johntony366
@johntony366 2 жыл бұрын
@@catholic_zoomer_br Well today .Net Core 6 absolutely stomps on Java, so better hold on to your jobs Java devs!
@Stuntman5701
@Stuntman5701 2 жыл бұрын
@@catholic_zoomer_br sadly java is literal garbage.
@hajiamano22
@hajiamano22 2 жыл бұрын
C# was my first language and it will always have a special place in my heart.
@photonic083
@photonic083 Жыл бұрын
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 ❤️
@amadii8768
@amadii8768 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
btw IL2CPP = Interpreted Language 2 (to) c++
@bertik2326
@bertik2326 2 жыл бұрын
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 2 жыл бұрын
Take a look at Tim Corey's channel. He is probably the best c# instructor out there.
@xiaonile
@xiaonile 2 жыл бұрын
Seconding with Tim Corey's channel on C# and .Net stuff.
@rod6722
@rod6722 Жыл бұрын
0:13 Oh gosh, what could've been...
@conway9214
@conway9214 2 жыл бұрын
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 2 жыл бұрын
javascript habits...
@ChristofferLund
@ChristofferLund 2 жыл бұрын
@@kerboplaytv8744 even javascript returns a promise
@kerboplaytv8744
@kerboplaytv8744 2 жыл бұрын
@Christoffer Lund Yes, but people misuse it all the time
@m3sian
@m3sian 2 жыл бұрын
Yep, that will not compile
@jude2223
@jude2223 2 жыл бұрын
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
@jawadsrour8490
@jawadsrour8490 2 жыл бұрын
Great content, as always!! Please do a Django, Flask, or ExpressJS in 100 seconds!!
@debadityanath4398
@debadityanath4398 Жыл бұрын
oh yes
@jackkendall6420
@jackkendall6420 2 жыл бұрын
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 2 жыл бұрын
What are asynchronous code and functions?
@jackkendall6420
@jackkendall6420 2 жыл бұрын
@@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 2 жыл бұрын
@@jackkendall6420 I\O? Input/output?
@jackkendall6420
@jackkendall6420 2 жыл бұрын
@@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.
@ChristofferLund
@ChristofferLund 2 жыл бұрын
Finally, my shit
@saikarumudi
@saikarumudi 2 жыл бұрын
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
@bity-bite
@bity-bite 2 жыл бұрын
Notes: @ 1:18 the namespace, class and the main method are not needed, you can directly write the statements (Top level statements). @ 1:26 it is better to enable nullabe in the .csproj. @ 0:40 .NET JITs the IL code to native-code too!
@02orochi
@02orochi 2 жыл бұрын
why is it better to set nullable?
@bity-bite
@bity-bite 2 жыл бұрын
@@02orochi because you'd have to put that #nullable in every single file. However, nullable is enabled by default in .NET 6 projects
@henz6868
@henz6868 2 жыл бұрын
Good call, thank you for the correction.
@marna_li
@marna_li 2 жыл бұрын
And don't forget "global usings" that let you define using-statements for the whole project in just one place. Eliminating the need to add the same using to every file that needs it. Then there are "implicit global usings" that imports global namespaces based on SDK the common namespaces for Console projects, and- the ASP.NET Core namespaces for Web etc.
@bity-bite
@bity-bite 2 жыл бұрын
@@marna_li Indeed! In fact, the `using System;` system is no longer needed, implicit using exist! There are many cool features that I wish if he talked about
@MiniKodjo
@MiniKodjo 2 жыл бұрын
15 years ago when I was saying i was a C# developer and i loved it, people made fun of me...
@zeckul
@zeckul 2 жыл бұрын
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 2 жыл бұрын
Agreed with all of the above.
@kopuz.co.uk.
@kopuz.co.uk. 2 жыл бұрын
1. no 2. no 3. sounds lazy 4. your point?
@antoniojohnson7693
@antoniojohnson7693 2 жыл бұрын
I only use "var" for types that aren't primitives or strings.
@michawhite7613
@michawhite7613 2 жыл бұрын
@@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 2 жыл бұрын
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
@Bliss467
@Bliss467 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
I think the video is a bit outdated if we get a little picky, but it is awesome nonetheless :D
@theshermantanker7043
@theshermantanker7043 2 жыл бұрын
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
@rainsong77
@rainsong77 2 жыл бұрын
Couple of things that stood out to me. It's Microsoft's .NET framework, not Windows. There's nothing windows specific about it. Writing private in front of members is completely unnecessary. And lastly, namespaces are just an organizational tool, you can use types across files without them. They are not modules. It's hard to convince people that c# isn't java when so many still write it like it is.
@thatKurtis
@thatKurtis 2 жыл бұрын
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 2 жыл бұрын
You can force things to be deleted with the "using" keyword or calling gc.collect on them.
@thatKurtis
@thatKurtis 2 жыл бұрын
@@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 2 жыл бұрын
@@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 Жыл бұрын
All of this. 100%
@yonderalt2662
@yonderalt2662 Жыл бұрын
@@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.
@tamamshud5879
@tamamshud5879 Жыл бұрын
C# is the better java
@AyushCo-2834
@AyushCo-2834 Ай бұрын
Nah they both equal
@tamamshud5879
@tamamshud5879 Ай бұрын
@@AyushCo-2834 No
@Tsunami14
@Tsunami14 2 жыл бұрын
C# is an absolute joy to work with. Glad it finally got featured.
@thatsalot3577
@thatsalot3577 2 жыл бұрын
You know that scene in boys season3 where Solider boy tells homelander "you're just a cheap knock-off" and he replies "No.. I'm the upgrade", That's how I see Java and C#.
@toxaq
@toxaq 2 жыл бұрын
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.
@kaiserbh9248
@kaiserbh9248 Жыл бұрын
Unity 😢😢
@Parkuman
@Parkuman 2 жыл бұрын
A Blazor course would be sweet! It leverages WebAssembly under the hood and would be cool to see :)
@YassaTaiseer
@YassaTaiseer 2 жыл бұрын
I have a 4 part Blazor WASM video series if thats something you might be interested in.
@Parkuman
@Parkuman 2 жыл бұрын
@@YassaTaiseer I'll check it out right now! thanks
@YassaTaiseer
@YassaTaiseer 2 жыл бұрын
@@Parkuman thanks much appreciated
@moe4b
@moe4b 2 жыл бұрын
Unity: is a multi-billion dollar game engine. Fireship: calls it a framework. Unity Users: ):
@XTANCE
@XTANCE 2 жыл бұрын
0:20 These numbers don't add up
@mobwow6833
@mobwow6833 Жыл бұрын
Well, starting today I'll be learning how to code starting with C#. Wish me luck lol.
@daurham
@daurham Жыл бұрын
How’s it going?
@mobwow6833
@mobwow6833 Жыл бұрын
@@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 Жыл бұрын
@@mobwow6833 How's it going?
@hkn5539
@hkn5539 Жыл бұрын
Have you learned the basics?! Please tell us the truth!
@mobwow6833
@mobwow6833 Жыл бұрын
@@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. :)
@Hard_Online
@Hard_Online 9 ай бұрын
The best language ever
@kagedevshorts4886
@kagedevshorts4886 2 жыл бұрын
C# Gang Here!!
@JXQU3
@JXQU3 11 ай бұрын
C# now with .NET 7 can also compile directly to native AOT (machine code) like C, Rust or Go.
@RHV044
@RHV044 9 ай бұрын
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
@TheNew1234_y
@TheNew1234_y Ай бұрын
C# also has also *alot* of stuff built in that require extra work in java or extra understanding.
@being_aslam_tiger
@being_aslam_tiger 2 жыл бұрын
You underestimated c#
@dahahaka
@dahahaka 2 жыл бұрын
A couple of things that really need to be fixed, maybe honestly worth a reupload because the video is already outdated: .NET Core is no longer relevant, it's just .NET now (.NET5 and soon .NET6) Xamarin is soon to be deprecated, people are already starting production of .NET MAUI apps (successor of Xamarin with Windows and MacOs support) Blazor is not only used for web but can also be used to deploy full on Mobile and Desktop apps using MAUI Blazor bindings, Hybrid Components and Blazor Desktop (think electron but more powerful and lightweight) Next thing is the compilation: While C# is most often Compiled to CIL and then run by the CLR, C# can also be compiled DIRECTLY to machine code with CoreRT or NativeAOT in the future. Also C# in unity is AFAIK C# script that isn't necessarily compiled to IL but i'm not actually sure about that one. Garbage Collection also isn't necessarily required when using AOT Compilation if you're doing anything super time sensitive like games.
@Igbon5
@Igbon5 Жыл бұрын
Imitation Java? It is obviously a C++ directed extension and expansion of Turbo Pascal, Object Pascal and Delphi. That's why Microsoft head hunted Anders, not to copy Java. He already had a head full of better ideas than Java. C#'s dad can beat up Java's dad.
@amidfallen
@amidfallen 2 жыл бұрын
embrace extend extinguish... Microsoft in a whole beauty
@mxbx307
@mxbx307 2 жыл бұрын
I know C# is spiritually similar to Java, but C# is just _nicer_ somehow. It feels more slick and more cohesive, meanwhile Java feels very cobbled together and discrete.
@Vexxel256
@Vexxel256 Жыл бұрын
It’s because of that bedamned NullPointerException
@VuLinhAssassin
@VuLinhAssassin 11 ай бұрын
As someone who had worked in Java, transition to C# is easy.
@Jeremyxyx
@Jeremyxyx 2 жыл бұрын
Visual Studio > Visual Studio Code, for the sake of Programming in C# at least. I like VSC as a Nodepad alternative though
@quachhengtony7651
@quachhengtony7651 Жыл бұрын
.NET 8 is coming, and I feel a storm brewing
@TejoAgus
@TejoAgus 2 жыл бұрын
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.
@__jan
@__jan 2 жыл бұрын
You should have these language introduction videos reviewed by people who actually use and understand the language, because the content is often misleading or just plain wrong.
@nort5396
@nort5396 2 жыл бұрын
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 2 жыл бұрын
same with me
@Katt1n
@Katt1n 2 жыл бұрын
Not sure what tutorials you are looking at, there is almost a redundancy of Unity tutorials on the web.
@sjoerdev
@sjoerdev 2 жыл бұрын
Watch brackeys
@joaovitorreynaldo
@joaovitorreynaldo 2 жыл бұрын
Watch Code Monkey. It's one of if not the best channel about Unity and programming in general.
@Stridsvagn69420
@Stridsvagn69420 2 жыл бұрын
In my opinion, C# is the better Java: It doesn't take that much resources like Java does (the same example program in C# uses like maximum 25 MB with debugging while even just the JVM takes like 150 MB of RAM) and you can easily compile it to a standalone binary for Windows, macOS and Linux. It's one of my favourite languages because it's so easy and well documented, and I even think it's very beginner friendly.
@MOTAMINE.
@MOTAMINE. 2 жыл бұрын
Wow...... 100 sec. = 2:27 min. New algorithm 🙄
@stroiman.development
@stroiman.development 2 жыл бұрын
There is a small factual error, c# does not have "destructors" as the narrator explains, but "finalizers", as the popup comment correctly says. It's not called when the object goes out of scope as explained, but during garbage collection, which makes the timing unpredictable. C# provides the interface IDisposable and a corresponding Dispose method for more predictable cleanup, combined with the "using" keyword, where necessary. Finalizers are only intended for cleaning up unmanaged resources, which most programmers don't need to be concerned with
@kusayfarhan9943
@kusayfarhan9943 2 жыл бұрын
Ah C# my go to language. One of the best languages for real world applications (outside of specialized applications).
@jammincoder
@jammincoder 2 жыл бұрын
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 😎
@robertwallace5498
@robertwallace5498 2 жыл бұрын
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
Brainf**k in 100 Seconds
2:10
Fireship
Рет қаралды 7 МЛН
I built 10 web apps... with 10 different languages
14:23
Fireship
Рет қаралды 1,6 МЛН
Will A Guitar Boat Hold My Weight?
00:20
MrBeast
Рет қаралды 253 МЛН
отомстил?
00:56
История одного вокалиста
Рет қаралды 7 МЛН
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 21 МЛН
Help Me Celebrate! 😍🙏
00:35
Alan Chikin Chow
Рет қаралды 42 МЛН
Every single feature of C# in 10 minutes
9:50
Train To Code
Рет қаралды 132 М.
10 regrets of experienced programmers
8:16
Fireship
Рет қаралды 1,4 МЛН
Unity in 100 Seconds
2:45
Fireship
Рет қаралды 1,1 МЛН
Naming Things in Code
7:25
CodeAesthetic
Рет қаралды 2,1 МЛН
Should you learn C++?? | Prime Reacts
20:29
ThePrimeTime
Рет қаралды 367 М.
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 198 М.
How To Make AWS Not Suck
6:38
Fireship
Рет қаралды 550 М.
I tried 10 code editors
10:28
Fireship
Рет қаралды 3 МЛН
C# vs .NET
8:27
Roberts Dev Talk
Рет қаралды 32 М.
Will A Guitar Boat Hold My Weight?
00:20
MrBeast
Рет қаралды 253 МЛН