We will be undergoing scheduled maintenance on May 20th, 2013 at 02:00 GMT.
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com�s entire library of video tutorials.
So far in the course we've talked about classes and we've talked a little bit about classes, how to create them the constructors, inheritance, interfaces and so forth. And in our classes we've looked at methods. And now we are going to go back and give a bit more attention to methods. It's really hard to determine exactly what order to put these in, so I hope this makes sense. We also talked about shared instances and properties, but a method, excellent description and this came from the Microsoft software development kit, methods contain the executable statements of a program. And so when I type a subroutine or a function inside a class module and then instantiate an object off of that class module, my subroutines and my functions become methods in that object. Because those are the different actions that object can take. And those are the different things that I can do with that, that object. I've already said these methods come from the subs and functions. So any public sub or function becomes a method in my object. Now with my methods I can put various levels of encapsulation on these just like I did with my classes, and if you will remember a little earlier, we talked about the different specifiers we could put on our classes, we can put those on methods as well. A method can be public: that means anybody can get to it. We also have private, which means it can only be invoked from inside that particular object. We also have friend and protected, and those have the same meanings they had earlier. They can be run in the program and so forth. So we can build our methods very much, these become smaller classes, and if you remember earlier in the course that we used classes to group our methods together, and we group methods based on functionalities. So for example a class called animal, we create sub routines that give us functionalities for what actions an animal takes - eating, sleeping, hunting. And then when we put those into a class and create an object off of it, then those subroutines become the methods that we call when we want this animal to take certain actions. Such as eating, sleeping or hunting.
| Course: | Microsoft Visual Basic .NET |
| Author: | Mark Long |
| SKU: | 33433 |
| ISBN: | 1932072349 |
| Release Date: | 2003-05-27 |
| Duration: | 6 hrs / 87 lessons |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |