C# generics tutorial example explained #C# #generics #tutorial
Пікірлер: 150
@BroCodez3 жыл бұрын
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(); } } }
@girlkun75183 жыл бұрын
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 Жыл бұрын
Thanks for code.
@nwerxuser65995 ай бұрын
Bro we need advanced C# videos.
@robertmanigault6252 жыл бұрын
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 Жыл бұрын
Exactly right?? Damn, why can't they be like this guy, just get to the point and get done with it!
@omoloni Жыл бұрын
@@UmarAlFarooqi'm from Russia, i even got it, but i knew
@johansno5019 Жыл бұрын
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 Жыл бұрын
This is the shortest but most understandable video on Generics I've found so far! Thanks very much!
@fjeanjoseph3 ай бұрын
To the point. No spending 30+ min just to explain a simple concept. Thanx
@Andrew-mo9gy Жыл бұрын
This is the best explanation of generics I've ever heard. Made it so simple to understand. Great demo. Thanks 🙏
@codewithdalvin3 ай бұрын
I've watched some videos about C# in english and spanish and as far as now you are one of the best choices for learning C# because the way you explain all that thing easy. Thanks!
@davestorm6718 Жыл бұрын
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).
@rasmuspennanen58232 жыл бұрын
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🙏
@rain86353 ай бұрын
this was actually such a simple yet super helpful explanation and great visualized by the example! thank you so much :)
@atauygur88528 ай бұрын
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.
@vikneshar1393 ай бұрын
That's some precise explanation about generics. Nice bro!!!
@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!!
@noextrasugar11 ай бұрын
Broooo I hit like after first 5 sec, and the ‘Thing’ just seal the deal 🤝 immediately subscribed! Best 5mins video series !!
@cabbiechuck Жыл бұрын
Clearest, most concise example of generics I have come across!
@VinayKhandagale-r8i Жыл бұрын
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-nr9jo3 жыл бұрын
Best teacher fr
@videolosss2 жыл бұрын
Best clear explanation of why generics I have found. Thank you
@_b0012 жыл бұрын
🤧🤧🤧 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.
@floyd666uk Жыл бұрын
Excellent video, always struggled with generics and you've just made me get it in 5 mins.
@redheadrusskie2 жыл бұрын
A copiously underrated channel. I love your stuff, please keep it up!
@Yinyan6622 жыл бұрын
thank you for these short and effective explaining videos! keep up the good work!
@FREDO-py4ti Жыл бұрын
Thank you Sir for this quick and clear explaination about GENERICS...i understand it a little bit better !!!
@LeonardoMolina-gr5lo Жыл бұрын
Great, Clear, Concise. Just amazing
@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
@kopilkaiser8991 Жыл бұрын
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 😊 😅
@DuI410932 жыл бұрын
Bro your explanation are really simple its really easy to understand . Thank you very much
@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 :)
@vidazarei3951 Жыл бұрын
Thank you so much, you explained Generics in the simplest way.
@rehanbhojani21122 жыл бұрын
i never comment, but i must tell u that u are the best and explain concepts straight forward
@fredchuks7822 Жыл бұрын
Best explanation of generics ever! Thanks a lot.
@fozler11 ай бұрын
Genius explanations brother
@nueledem35252 жыл бұрын
So simple! An amazing teacher!
@luissabalaable2 жыл бұрын
straight to the point and easy to understand. Thanks Bro Code!
@LuzuVlogsGamer11 ай бұрын
This is what Perfection looks like ;o
@grantwilliams9838 Жыл бұрын
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 !!!
@Atom-Mercury11 ай бұрын
You explain so well, bravo Bro.
@alexgolomb3636 ай бұрын
0:19 that was such a solid uhhhhhhhahhhhhhhh
@YuriiHonta2 жыл бұрын
Using THING to explain is giving us association. Genius.
@kylekyle81312 жыл бұрын
Clear and straight to the point! Awesome video 👍
@pydzio2 жыл бұрын
Awesome! This concept is actually very easy to understand.
@001marselle Жыл бұрын
I like your videos since you convert the difficult things to easy
@kylekeenan34852 жыл бұрын
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!
@lethokuhlemntungwa37158 ай бұрын
Omg, Thanks.. This was so helpful🙏 Why is the double display a whole number and not a decimal?Just curious
@UlisesGB.10 ай бұрын
short, specific and great. You got a new subscriber :)
@قناةالطيبالمعلوماتية Жыл бұрын
ّ I learned a lot from you. Thank you so much
@slashd Жыл бұрын
Can we get an example how to use this with multiple add functions for Entity Framework?
@suzu61657 ай бұрын
PERFECT. thank you so much sir 🙏🙏
@РахматиллаАбдукадыров-ф8щ2 жыл бұрын
cool video,nice explanation,thanks
@andywawa7227 Жыл бұрын
clear, structured and simple, thanks bro 😉
@kirillberia17973 жыл бұрын
Love your tutorials!
@AbdullahAkhtar-mo7ro2 ай бұрын
Brilliant explanation in less time 😇
@BeastShortsHub-p2mАй бұрын
Really Good man.
@manikandanu15072 жыл бұрын
Thanks bro. It's very helpful ☺️👍
@Siuuu-gy8ro Жыл бұрын
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.
@ic_1234 Жыл бұрын
why doesnt it print 1.0, 2.0, 3.0?
@staayfan2 жыл бұрын
Merci infiniment bro… simple and very precise
@hayotbahromnurdinov7409 Жыл бұрын
thanks bro for your helping, I thought I never understand generic types
@chrisgille14602 жыл бұрын
So you can pretty much use generics as a alternative of boxing and unboxing??
@danielam12479 ай бұрын
Thank you it was very clear bro!
@givolimyerukim Жыл бұрын
very straight forward, thanks bro
@sanasayyad18722 ай бұрын
When he calls displayElements(doubleArray); So in output why does it shows 1, 2 ,3 why not 1.0, 2.0,3.0 thats what he defined right someone please explain
@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?
@uweopfern2 жыл бұрын
Best generics tutorial that i have ever seen
@MartynasCepauskas18 күн бұрын
why not use objects ? :) I made my testing using T and its running any faster..
@nickout992 жыл бұрын
Would be nice too see if it would show decimals and alphanumeric characters also, just to see what the limitations are
@glasgood9907Ай бұрын
Straight to the point
@trustingod0 Жыл бұрын
How does this work with Generic Types?
@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.
@rashidfarhan62237 ай бұрын
HELL YEAH BROTHER! I'LL ALWAYS TYPE THING FROM NOW ON!
@enespinar97119 ай бұрын
Bro you taught me better than my college professor
@cyrocyro7904 Жыл бұрын
Man keep up the good work
@spartanranger3 жыл бұрын
Thanks for the video Bro.
@ahmedel-saadany703 Жыл бұрын
Fantastic brooo🖤
@jeremiahsease57845 ай бұрын
So it's kinda like using var in Java script ?🤔
@mertkurt947 Жыл бұрын
so understandable , thanks much
@FullExtension1 Жыл бұрын
you are such a bro, bro
@MandisaKhanyile93Ай бұрын
forgive me but i do not undertand, you are calling each array but are only getting int, and string, where is the doubleArray when you compiling?
@SpGIIFaCeZz19 күн бұрын
He's getting the double array, he's just made a bad input as an example... The 1.0 , 2.0 and 3.0 gets the .0 removed because they are not needed. If he'd had put 1.1 2.2 and 3.3 as an input it would have made more sense. Hope i interpreted your question right 😅