VB.NET 2013: Classes - Methods, Members and Constructors

  Рет қаралды 47,337

Nicholas Dingle

Nicholas Dingle

Күн бұрын

The basics playlist covers the essential skills and knowledge you'll need to program in VB.NET. This video covers the following features:
* A quick reintroduction to classes
* Public, Private and Shared Members
* Methods
* Properties
* Constructors
As always any comments or suggestions please drop a line!

Пікірлер: 22
@mef9327
@mef9327 6 жыл бұрын
Great video. Thanks. I'm trying VB as a "hobby". Two books and many videos mentioned using "new" to instantiate but none explained why until yours. I'm the kind that learns/understands better when I know the logic and reasons behind the process. Also, many of the other examples including the two books also used get/se with no error checking . It didn't make sense to me either. Glad to hear I wasn't just misunderstanding something.
@evanjava2920
@evanjava2920 4 жыл бұрын
Thanks a lot for this easy explanation .... You made it very simple to understand!!!
@danp129
@danp129 5 жыл бұрын
11:32 You suggest using public variables instead of public properties if you don't need control over the get/set methods of a property. If you'll notice @ 7:35, you typed out "Public Property Width" without get/set, and there is no error... I would suggest you still declare the properties and simply leave out the get/set methods if you want to save 8 lines of code.
@chuckf3109
@chuckf3109 7 жыл бұрын
Did you suggest that I play with my private member at the end? I didn't need that suggestion by the way.
@mengistuafel5688
@mengistuafel5688 8 жыл бұрын
Great video +Nicholas Dingle
@GaryHutsonVBA
@GaryHutsonVBA 9 жыл бұрын
Great video +Nicholas Dingle :)
@majormuffin8067
@majormuffin8067 2 жыл бұрын
This just saved my comp project lmao
@1480551
@1480551 9 жыл бұрын
Great video Nicholas! I was curious about using get/set all the time too, so I read up and found this: The variables in a class define the state of an object during an instance of that class. In larger programs, using get/set even for simple variables in which you aren't checking it against an expression, helps maintain the state of that object from being altered outside the scope of the class. I guess that's why Microsoft would use it all the time? P.S. Your tutorials are awesome, can you make a vid on how to implement Interfaces sometime. It'd help a bunch!
@NicholasDingle
@NicholasDingle 9 жыл бұрын
Richard Elliott Thanks Richard, interesting to see that. I wouldn't think that a objects inside a class can't be altered outside of their scope since everything is encapsulated - I might have a little learning to do in that area. I've always had the opinion that just use public members and I remember reading Notch's blog a while back with the same opinion (not that it confirms it for the world but because Notch thinks it). Again, thanks for watching mate
@1480551
@1480551 9 жыл бұрын
Nicholas Dingle XD No need to thank me... you make the tutorials, so I thank you!Here's the forum discussion I read about if you have time and wanna read what I did: programmers.stackexchange.com/questions/143736/why-do-we-need-private-variables Keep up the good vids!
@realsteelassault
@realsteelassault 9 жыл бұрын
Hi mate, great tutorial, thanks so much for sharing your knowledge !
@NicholasDingle
@NicholasDingle 9 жыл бұрын
diego ballar Happy to!
@hasantalaei2655
@hasantalaei2655 Жыл бұрын
thank you🙏
@TheJack8882
@TheJack8882 9 жыл бұрын
You really simplified my understanding of Classes. Is there a lesson on destructors?
@NicholasDingle
@NicholasDingle 9 жыл бұрын
***** I don't have one unfortunately. The main reason I didn't include it in this video was because it didn't really suit to the class I was using. Microsoft have great examples! msdn.microsoft.com/en-us/library/2z08e49e(v=vs.90).aspx
@siouxperirish
@siouxperirish 9 жыл бұрын
Enjoying your course Nicholas, had a question about where you suggest using Public Variables vs. Public Properties (1 line of code vs. 8 lines), @ 11:30 of this video. My question is, will this technique work with data binding? Thank you and I appreciate these excellent courses.
@educatorestrada29
@educatorestrada29 7 жыл бұрын
I am an intern with a project, and since i never really understood how to create methods clearly, then my button for my project will not work: This button has to work to do everything. Example, in Access 2010, it has to bring up a table in excess, once excess steps in it must have the power of qrys, ans sub tables, or super tables, (reading multiple qrys). I'm lost can you help me, or give me a hint, my project is to create a user end form with a button, who does not know how to program, and should not name anything once imported, they only press a button to tell the program which table she or he wants to view. Margarita, (lost in programming)
@emilie1977
@emilie1977 9 жыл бұрын
How can I set property in sub new?
@StriderAngel496
@StriderAngel496 4 жыл бұрын
Great video, i think you have one of the BEST tutorials out there for VB and programming in general. BUT... To be fair, kzbin.info/www/bejne/q5vTl4yIitZ6nLM , when they declare the language classes setting everything as properties and making it as general as possible helps a lot of thing: you can use them in a lot more way and you CAN'T use them in the way they weren't intended to be used, you have an easy way of seeing all the available properties (in Intellisense, all the properties pop up while you type code and they have a comment or description attached to them) AAAAAND you can set and get properties in the Designer. Everything you expose as a public property appears in the Designer after building the project. If they just made everything a public variable you would have to do a lot of guess work to figure out what you can work with and constantly read hundreds of pages of documentation instead of just having them pop up neatly in the Properties tab at Design Time xD.
@aaronarnold3107
@aaronarnold3107 9 жыл бұрын
Once you move the values to constructors, the properties no longer function to prevent negatives in the user input. Are constructors and properties mutually exclusive?
@NicholasDingle
@NicholasDingle 9 жыл бұрын
Now that's the beauty of it. I can't remember what I did specifically in the video, but if you have Me.PropertyName = Parameter then the data has to go through the property. So the negative checks will be in place.
@dragonboyjazz
@dragonboyjazz 7 жыл бұрын
lol, i misheard this...kzbin.info/www/bejne/q5vTl4yIitZ6nLM , i nearly wee'd in my chair, i thought you said "visual studio doesn't fill in the gaps for you, not until your thirteen anyway"
VB.NET 2013: Classes - Inheritance and Polymorphism
11:37
Nicholas Dingle
Рет қаралды 32 М.
VB.NET 2013: Classes - Operators and Method Overriding
12:52
Nicholas Dingle
Рет қаралды 12 М.
escape in roblox in real life
00:13
Kan Andrey
Рет қаралды 78 МЛН
Will A Guitar Boat Hold My Weight?
00:20
MrBeast
Рет қаралды 214 МЛН
VB.NET 2013 - Classes
11:52
Nicholas Dingle
Рет қаралды 43 М.
VB.NET 2013: Parameters - ByRef vs ByVal, Optional and Arrays
19:52
Nicholas Dingle
Рет қаралды 17 М.
VB.NET Programming. Intermediate Lesson 5. Write your own Functions
8:34
VB.NET 2013 - Arrays
32:11
Nicholas Dingle
Рет қаралды 69 М.
VB.NET 2013 - Lists
12:22
Nicholas Dingle
Рет қаралды 16 М.
Don't Use Polly in .NET Directly. Use this instead!
14:58
Nick Chapsas
Рет қаралды 62 М.
Visual Basic Tutorial - Object Oriented Programming
29:25
Donnie Santos
Рет қаралды 33 М.
Visual Basic Tutorial 4 Object Oriented Programming
29:52
Derek Banas
Рет қаралды 78 М.
Vb.net - Using Object Oriented Programming
18:18
BrandonioProductions
Рет қаралды 40 М.
escape in roblox in real life
00:13
Kan Andrey
Рет қаралды 78 МЛН