C# generics ⁉️

Поделиться
HTML-код
  • Опубликовано: 12 июн 2024
  • C# generics tutorial example explained
    #C# #generics #tutorial
  • НаукаНаука

Комментарии • 131

  • @BroCodez
    @BroCodez  2 года назад +49

    using System;
    namespace MyFirstProgram
    {
    class Program
    {
    static void Main(string[] args)
    {
    // generic = "not specific to a particular data type"
    // add to: classes, methods, fields, etc.
    // allows for code reusability for different data types
    int[] intArray = { 1, 2, 3 };
    double[] doubleArray = { 1.0, 2.0, 3.0 };
    String[] stringArray = { "1", "2", "3" };
    displayElements(intArray);
    displayElements(doubleArray);
    displayElements(stringArray);
    Console.ReadKey();
    }
    public static void displayElements(Thing[] array)
    {
    foreach (Thing item in array)
    {
    Console.Write(item + " ");
    }
    Console.WriteLine();
    }
    }
    }

    • @girlkun7518
      @girlkun7518 2 года назад +1

      Hi! Could you make a video about topic "How to handle 2 keys pressed simultaneously in java"? Please... I'm Vietnamese and I'm really looking forward to this

    • @gaccone1.1
      @gaccone1.1 11 месяцев назад +1

      Thanks for code.

    • @nwerxuser6599
      @nwerxuser6599 Месяц назад

      Bro we need advanced C# videos.

  • @robertmanigault625
    @robertmanigault625 2 года назад +97

    I watched 2 other videos in which the presenters, although very knowledgeable, rambled on incessantly while attempting to explain generics. Your explanation is clear and concise and above all, effective. Keep up the good work, Bro.

    • @UmarAlFarooq
      @UmarAlFarooq Год назад +5

      Exactly right?? Damn, why can't they be like this guy, just get to the point and get done with it!

    • @omoloni
      @omoloni 10 месяцев назад

      ​​@@UmarAlFarooqi'm from Russia, i even got it, but i knew

    • @johansno5019
      @johansno5019 8 месяцев назад

      Exactly. I feel most tutorials are like that. Too much unnecessary info and jumping from thing to thing, and just skimming through what you want to know. I love when it's just straight to the point like these

  • @black-forest-code
    @black-forest-code Год назад +28

    This is the shortest but most understandable video on Generics I've found so far! Thanks very much!

  • @Andrew-mo9gy
    @Andrew-mo9gy Год назад +9

    This is the best explanation of generics I've ever heard. Made it so simple to understand. Great demo. Thanks 🙏

  • @davestorm6718
    @davestorm6718 Год назад +5

    Not sure how I got away with not using generics in many years of programming, but I wish I had before. This is the most concise explanation I've seen (there are hour long videos on this topic, but this is the best).

  • @rasmuspennanen5823
    @rasmuspennanen5823 2 года назад +6

    Holy balls bro I'm taking my first uni course on C# and every one of your videos that I've watched has been an absolute godsend🙏

  • @cabbiechuck
    @cabbiechuck Год назад

    Clearest, most concise example of generics I have come across!

  • @videolosss
    @videolosss 2 года назад +1

    Best clear explanation of why generics I have found. Thank you

  • @shallanrambaran7090
    @shallanrambaran7090 Год назад +1

    Excellent stuff man, really appreciate the quick, clear and concise information.

  • @LeonardoMolina-gr5lo
    @LeonardoMolina-gr5lo Год назад

    Great, Clear, Concise. Just amazing

  • @floyd666uk
    @floyd666uk Год назад +1

    Excellent video, always struggled with generics and you've just made me get it in 5 mins.

  • @nueledem3525
    @nueledem3525 Год назад

    So simple! An amazing teacher!

  • @atauygur8852
    @atauygur8852 4 месяца назад

    I am 👌 this close to start worshipping you. It is amasing you can make me feel confident about magical and scary words I always hear in tutorials and courses in 5 minutes.

  • @Yinyan662
    @Yinyan662 Год назад

    thank you for these short and effective explaining videos! keep up the good work!

  • @kylekyle8131
    @kylekyle8131 Год назад

    Clear and straight to the point! Awesome video 👍

  • @luissabalaable
    @luissabalaable 2 года назад +2

    straight to the point and easy to understand. Thanks Bro Code!

  • @fredchuks7822
    @fredchuks7822 Год назад

    Best explanation of generics ever! Thanks a lot.

  • @karlallanicsky
    @karlallanicsky Год назад

    Thank you! While watching this I've had realizations in which "I could have done that during my functions in xxx"
    Thank you so much, you explain everything so well

  • @user-rp1bp3wu8l
    @user-rp1bp3wu8l 9 месяцев назад

    So well explained! Have been confused about what the means and nobody ever explained it's just something you can name according to your choice

  • @Bear-nr9jo
    @Bear-nr9jo 2 года назад +3

    Best teacher fr

  • @redheadrusskie
    @redheadrusskie 2 года назад

    A copiously underrated channel. I love your stuff, please keep it up!

  • @mamabrowsss1160
    @mamabrowsss1160 Год назад

    I can't even count the number of videos I've watched on Generics and it still confuses me. After watching this, and the way you kept it simple and straight to the point, I finally get it!! Thank you :)

  • @johnspencer772
    @johnspencer772 Год назад

    A great simple explanation of something I had 'worried' over through the years. I can see now that a long-winded explanation is not necessary. If anything, that long-windedness begins the trip into confusion. I can see no that generics took 'overloading' a step further!! Thanks!!

  • @noextrasugar
    @noextrasugar 7 месяцев назад

    Broooo I hit like after first 5 sec, and the ‘Thing’ just seal the deal 🤝 immediately subscribed! Best 5mins video series !!

  • @pydzio
    @pydzio Год назад

    Awesome! This concept is actually very easy to understand.

  • @vidazarei3951
    @vidazarei3951 Год назад

    Thank you so much, you explained Generics in the simplest way.

  • @mindurownbussines
    @mindurownbussines 5 месяцев назад

    Thanks Bro
    Good teachers make students fall in love with the subject. You're a good teacher

  • @kirillberia1797
    @kirillberia1797 2 года назад +1

    Love your tutorials!

  • @FREDO-py4ti
    @FREDO-py4ti Год назад

    Thank you Sir for this quick and clear explaination about GENERICS...i understand it a little bit better !!!

  • @Atom-Mercury
    @Atom-Mercury 7 месяцев назад

    You explain so well, bravo Bro.

  • @_b001
    @_b001 Год назад +1

    🤧🤧🤧 I'm in tears, the first language that I learnt is javascript and now in my company we use c#, I have searched a number of videos and articles and they all try to confuse generics as much as possible but this video is a gold mine, I have to scroll down for this video to show up, I will share this channel so others can subscribe to this too, thank you very much bro.

  • @fozler
    @fozler 6 месяцев назад +1

    Genius explanations brother

  • @andywawa7227
    @andywawa7227 Год назад

    clear, structured and simple, thanks bro 😉

  • @UlisesGB.
    @UlisesGB. 6 месяцев назад

    short, specific and great. You got a new subscriber :)

  • @kopilkaiser8991
    @kopilkaiser8991 9 месяцев назад

    Bro you are the best. Thank you for teaching us about generics. I liked, commented, and shared your valuable video. It needs to he spreaded in order to teach all who are willing to learn. Definitely, a lot of wandering souls who are lost on thia topic 😊 😅

  • @suzu6165
    @suzu6165 3 месяца назад

    PERFECT. thank you so much sir 🙏🙏

  • @user-sf9zj9eo7d
    @user-sf9zj9eo7d Год назад

    cool video,nice explanation,thanks

  • @dula9310
    @dula9310 Год назад

    Bro your explanation are really simple its really easy to understand . Thank you very much

  • @001marselle
    @001marselle 8 месяцев назад

    I like your videos since you convert the difficult things to easy

  • @rehanbhojani2112
    @rehanbhojani2112 Год назад

    i never comment, but i must tell u that u are the best and explain concepts straight forward

  • @danielam1247
    @danielam1247 4 месяца назад

    Thank you it was very clear bro!

  • @user-ye7fo5mw7h
    @user-ye7fo5mw7h Год назад

    ّ I learned a lot from you. Thank you so much

  • @staayfan
    @staayfan Год назад

    Merci infiniment bro… simple and very precise

  • @manikandanu1507
    @manikandanu1507 Год назад

    Thanks bro. It's very helpful ☺️👍

  • @givolimyerukim
    @givolimyerukim Год назад

    very straight forward, thanks bro

  • @grantwilliams9838
    @grantwilliams9838 11 месяцев назад

    Awesome. I've been searching everywhere for an explanation on this syntax. Finally found it in an accent I understand and with a very easy to understand example. Well done Bro !!!

  • @LuzuVlogsGamer
    @LuzuVlogsGamer 7 месяцев назад +1

    This is what Perfection looks like ;o

  • @ahmedel-saadany703
    @ahmedel-saadany703 Год назад

    Fantastic brooo🖤

  • @spartanranger
    @spartanranger 2 года назад

    Thanks for the video Bro.

  • @uweopfern
    @uweopfern 2 года назад

    Best generics tutorial that i have ever seen

  • @user-fs1hv7dk7o
    @user-fs1hv7dk7o 2 года назад

    Using THING to explain is giving us association. Genius.

  • @hayotbahromnurdinov7409
    @hayotbahromnurdinov7409 Год назад

    thanks bro for your helping, I thought I never understand generic types

  • @cyrocyro7904
    @cyrocyro7904 Год назад

    Man keep up the good work

  • @yushi2220
    @yushi2220 11 месяцев назад

    Thank you

  • @justamovie
    @justamovie Год назад

    🤯Thanks, Bro!

  • @kylekeenan3485
    @kylekeenan3485 2 года назад

    Wow light bulb moment. So many times I have had code that I try to avoid duplicating and the only difference is the data type resulting in me having to duplicate the code. This is the solution! I am surprised none of the 5 senior Devs at my workplace ever mentioned using generics in the code review though!

  • @abdullah.nayem.enosisbd
    @abdullah.nayem.enosisbd Год назад

    Thanks!

  • @tbtmtfth
    @tbtmtfth 6 месяцев назад

    great videoooo

  • @mertkurt947
    @mertkurt947 Год назад

    so understandable , thanks much

  • @KhaledAlhelwane
    @KhaledAlhelwane 5 месяцев назад

    thank you 🥰

  • @hamzaasmaabdoulkarim4724
    @hamzaasmaabdoulkarim4724 Год назад

    Thanks bro

  • @mostafataheri4939
    @mostafataheri4939 10 месяцев назад

    tnx that was grate
    👍👍

  • @rashidfarhan6223
    @rashidfarhan6223 3 месяца назад

    HELL YEAH BROTHER! I'LL ALWAYS TYPE THING FROM NOW ON!

  • @aliabouhawia1563
    @aliabouhawia1563 2 года назад +1

    Thanks Bro:)

  • @BigToasti
    @BigToasti Год назад

    Thanks Bro!

  • @armm6437
    @armm6437 Год назад

    very useful!

  • @amplifiedge
    @amplifiedge Год назад

    thank you bro!

  • @FullExtension1
    @FullExtension1 Год назад

    you are such a bro, bro

  • @nickout99
    @nickout99 Год назад

    Would be nice too see if it would show decimals and alphanumeric characters also, just to see what the limitations are

  • @Lonchanick
    @Lonchanick 11 месяцев назад

    Nice!

  • @fushitensho7840
    @fushitensho7840 Год назад

    my lifesaver

  • @lethokuhlemntungwa3715
    @lethokuhlemntungwa3715 4 месяца назад

    Omg, Thanks.. This was so helpful🙏
    Why is the double display a whole number and not a decimal?Just curious

  • @euphoriaorphan
    @euphoriaorphan 7 месяцев назад

    thanks bro

  • @MariemMili
    @MariemMili Год назад

    thanx😄

  • @caseyspaulding
    @caseyspaulding Год назад

    Wow nice!

  • @alexgolomb363
    @alexgolomb363 2 месяца назад

    0:19 that was such a solid uhhhhhhhahhhhhhhh

  • @fisix5151
    @fisix5151 2 месяца назад

    yo thank you brother

  • @Adze-yah
    @Adze-yah Год назад

    ggs, this explanation helped me well.

  • @enespinar9711
    @enespinar9711 5 месяцев назад

    Bro you taught me better than my college professor

  • @henrik3098
    @henrik3098 Год назад

    thx dude

  • @prathameshgaikwad7550
    @prathameshgaikwad7550 Год назад

    I just want to know can we use var or object data types as parameters for methods and a var or object data type in foreach loop?

  • @Siuuu-gy8ro
    @Siuuu-gy8ro 9 месяцев назад

    I like how you only explain the subject of the video. You explained what generics are, thats it. You could also have explained sorting with generic types but that would be to much info and people might get confused. W bro code.

  • @slashd
    @slashd Год назад

    Can we get an example how to use this with multiple add functions for Entity Framework?

  • @vasykloepexergasia7562
    @vasykloepexergasia7562 Год назад

    east or west
    bro is the best

  • @corvoattano93
    @corvoattano93 2 года назад

    🤩

  • @TylerHerwek
    @TylerHerwek Год назад

    👍🏿

  • @chrisgille1460
    @chrisgille1460 2 года назад

    So you can pretty much use generics as a alternative of boxing and unboxing??

  • @allnicksweretaken
    @allnicksweretaken Год назад

    Thanks for pointing out the T Thing part! ^_^

  • @whitedinamo
    @whitedinamo 2 года назад

    lesson check😇

  • @LeonardoMolina-gr5lo
    @LeonardoMolina-gr5lo Год назад

    Just liked, subscribed. Honestly if you read this thank you! Plus code in comments ;)

  • @adeebsiddiqui5140
    @adeebsiddiqui5140 2 года назад +1

    Yay, First Like

  • @UmarAlFarooq
    @UmarAlFarooq Год назад

    Bro, you are AWESOME! You explained something in such a simple and straightforward way; that Tim Corey is a JOKE compared to your content.

  • @Stellanovum
    @Stellanovum Год назад

    This video is great! Consider that like button obliterated.

  • @gunnerxt
    @gunnerxt Год назад

    Brooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo thanks

  • @trustingod0
    @trustingod0 8 месяцев назад

    How does this work with Generic Types?

  • @adambosick3137
    @adambosick3137 3 месяца назад

    Just commenting for the algorithm lol.

  • @la-ki5wd
    @la-ki5wd 11 месяцев назад

    i was too lazy at first for liking and subscribing but 1like=1prayer is genius thx for the good explanation also!

  • @ic_1234
    @ic_1234 8 месяцев назад +1

    why doesnt it print 1.0, 2.0, 3.0?

  • @jeremiahsease5784
    @jeremiahsease5784 27 дней назад

    So it's kinda like using var in Java script ?🤔

  • @VectorMousepad8759
    @VectorMousepad8759 6 дней назад

    comment for the algorithm gods