VB.NET 2013: Classes - Inheritance and Polymorphism

  Рет қаралды 33,045

Nicholas Dingle

Nicholas Dingle

Күн бұрын

Пікірлер: 28
@qaisarqadeer3370
@qaisarqadeer3370 4 жыл бұрын
very easy and simple way to teach someone about Classes. By far the best method of teaching!
@b3zzi
@b3zzi 3 жыл бұрын
Legend! Explaining concepts that expensive textbooks can't
@GaryHutsonVBA
@GaryHutsonVBA 9 жыл бұрын
I have bought 4 VB.Net books and basically I am going to chuck them out, because that description of how to use inheritance is the best I have seen. Your sir, are a legend!
@jeremy75414321
@jeremy75414321 6 жыл бұрын
Great Explanation of classes, I've been studying programming for about 1 year with different techniques and tutorials. This is by far the easiest to understand VB.net tutorial playlist. Thanks for the tutorials, I am learning to think like a programmer now.
@michaelfaust5191
@michaelfaust5191 6 жыл бұрын
Thank you so much for the explanation you've given in this video! You can't imagine how much your videos have taught me about classes and their properties!
@TailSpin46
@TailSpin46 8 жыл бұрын
For a good example of inheritance an polymorphism, look for an implementation of the shape example. Most good examples will explain it well. Keep up the good videos Nicholas.
@hondatuner83
@hondatuner83 9 жыл бұрын
Simple but good explanation. Well done. It's good to brush up on these. I forget some of these very basic things that I should be trying to implement in my daily coding.
@sa1998ba
@sa1998ba 5 жыл бұрын
Man!! you're a truly legend!
@ga7853
@ga7853 7 жыл бұрын
That was great Nicolas, you have made polymorphism simple remember. Thanks
@mef9327
@mef9327 3 жыл бұрын
9:51 since volume is area times depth, can you call the cRectangle GetArea() and multiply it by depth? For example, “MyBase.GetArea() * _depth_” Is that possible or is their another way so that changes to the base class formula automatically propagate through the inheriting class?
@mermaidoasis8452
@mermaidoasis8452 3 жыл бұрын
Very beautiful video Nicholas. Your name looks Greek. I am from Greece too. However, I have some questions please. It would be my pleasure to answer me. First question at the Cube class, inside the sub New with the three arguments width, height and depth. You wrote MyBase.New(Width,Height) and depth=_depth. Couldn't we say directly MyBase.New(Width,Height,Depth) ? And secod question please, is about polymorphism. What is the difference between two same functions GetArea of both classes at the body of them? Do we have only to the original class GetArea function return _width * _height and does really the system recognise these both similar functions with the overloads keyword? And let's extent a little bit that question what would happen if at the cube class we added parameters to the overloaded function GetArea? For example Overloads Function GetArea (byRef _width, byRef _height, byRef _depth) would we have any error about arguments even passing byRef or byVal respectively? Thank you so much in advanced.
@tshehlatefokhulwane5318
@tshehlatefokhulwane5318 6 жыл бұрын
..A good video indeed. Thank you Sir.
@michaelnewman9645
@michaelnewman9645 7 жыл бұрын
A simple but good tutorial. However, I need something more advanced. I want to modify a datagridview combobox to have a button with text above the dropdown list. The button will be used for adding items to the data table bound to the combobox. When the button is clicked, a new form is opened where the new data table item an be entered.I have looked at the only example that I can find on the web which is for creating a date column but I have not been able to adapt that to meet my needs. Can you suggest a good KZbin tutorial that may help me to understand how comboboxes can be adapted in this way?
@NicholasDingle
@NicholasDingle 7 жыл бұрын
+Michael Newman I honestly haven't done much with datagridviews. I did find this tut www.wpftutorial.net/datagrid.html
@michaelnewman9645
@michaelnewman9645 7 жыл бұрын
Thanks Nicholas but that deals with a datagridview using standard columns. As I have been programming for over ten years, I am familiar with the workings of a DGV. If I could find out how to modify a standard combobox to meet my needs, I think I could modify that to work in a datagridview
@NicholasDingle
@NicholasDingle 7 жыл бұрын
+Michael Newman That's what I was hoping, but I couldn't really find much on datagridviews like you said.
@katana7068
@katana7068 9 жыл бұрын
Really good tutorial! Subscribed! Any reason why the Sub isn't public in the cube or did you just forget?
@NicholasDingle
@NicholasDingle 9 жыл бұрын
If it's Sub New you are referring to it's because you don't really need to specify Private or Public - by default they are Public (and Sub New needs to be public). As for GetArea, I just forgot to put it on. It should be Public.
@katana7068
@katana7068 9 жыл бұрын
tyvm!
@aaronarnold3107
@aaronarnold3107 9 жыл бұрын
Does coercion only work on subs? I don't see why VB can't select the function with _depth included, and we have to manually tell it to use cCubes version of getarea with the "Overloads" designation.
@NicholasDingle
@NicholasDingle 9 жыл бұрын
So there is a big difference between Coercion and Overloading. Coercion is purely Subs and Functions which you want to use multiple times but with different number of parameters or different parameter data types. Overloading is only ever for functions which are marked as Overloadable. On such example is the ToString function. ToString already has code and doesn't accept and parameters (by default) and it's marked as Overloadable. This means that you can Overwrite the original function of ToString to whatever function you wish. Tell me if any of this makes sense.
@aaronarnold3107
@aaronarnold3107 9 жыл бұрын
Nicholas Dingle The confusion starts at the 10 minute mark in the video. You state that VB is having trouble because it has a "getarea" function in the cRectangle class, and has a "getarea" function in the cCube class and it doesn't know which one to pick. I figured VB would use coercion to choose the cCube class version of "getarea" because it has the appropriate number of values (height, width, depth) in the parameters . However, it doesn't and you have to use overloading to instruct VB to execute the cCube version of the function.
@NicholasDingle
@NicholasDingle 9 жыл бұрын
The big difference here, that I can see, is that because they are classes and not just functions in the same module. I'll revisit this when I get the chance and get back to you.
@ausamabutt9747
@ausamabutt9747 7 жыл бұрын
y did u created sub new in class cCube??? And y did u use "new" instead of create (in constructors part) in base class
@emilie1977
@emilie1977 9 жыл бұрын
thank you very much
@AliEkerci-p9b
@AliEkerci-p9b 3 ай бұрын
Thomas Paul Rodriguez Jennifer Wilson David
@justhereforkpop
@justhereforkpop 2 жыл бұрын
??
@assg914
@assg914 Жыл бұрын
I have a cie tomorrow and I love you, Hence I would also suggest that you Accept Islam so that I can pray you go to paradise
VB.NET 2013: Classes - Operators and Method Overriding
12:52
Nicholas Dingle
Рет қаралды 12 М.
VB.NET 2013: Classes - Methods, Members and Constructors
20:24
Nicholas Dingle
Рет қаралды 47 М.
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
GOODBOY REFFERAL INCOME - GOOGLE FORM
3:24
Leo2407
Рет қаралды 93
Fundamental Concepts of Object Oriented Programming
9:16
Computer Science Lessons
Рет қаралды 967 М.
Jonathan Blow on the Problem with Object Oriented
3:43
Jonathan Blow Clips
Рет қаралды 79 М.
.NET and C# are in trouble. Here is what I'd do.
10:57
Ed Andersen
Рет қаралды 115 М.
Interface - Introduction, Multiple Inheritance | VB.Net
16:18
Dr. Ankit Verma
Рет қаралды 2,4 М.
VB.NET 2013 - Classes
11:52
Nicholas Dingle
Рет қаралды 43 М.
Object Oriented Programming VB .net - Creating Classes
16:34
Professor Saad
Рет қаралды 9 М.
Object Oriented Programming 8 - Inheritance
7:58
Computer Science Lessons
Рет қаралды 16 М.