|
-
Jun 1st, 2003, 04:25 PM
#1
Thread Starter
Hyperactive Member
Interface Question
Are Interfaces in vb.net mostly used for encapsulation purposes? I don't see any real benifit from using them other than maintaining organized and encapsulated code. I mean If I use 5 different Interfaces in one class, even If i only use 1 of those interfaces, all the other Interfaces routines and values are still using up memory and being saved when I serialize the class which implemented all 5 interfaces.. Can anyone enlighten me or am I right on target?
-
Jun 2nd, 2003, 08:15 AM
#2
New Member
Interfaces in any object-oriented language allow you to leave the specific implementation of the methods, events and properties to the implementing class. It means that you can change the specifics of a method in a class that implements an interface without having to worry about the rest your application being affected by it. Your app still uses the same interface so it doesn't care about how it actually does something.
It is a different technique than using inheritence, where the implementation of the methods etc are already defined, and is usually used to extend some functionality of a base class in the derived class.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|