-
"MustInherit" Keyword
Hi everybody,
I am new to vb.net . I understood the concept of using "Mustinherit" keyword. but I don't really understand under what circumstances it would be useful in the realworld.
If you guys have any ideas or experiences or scenarios when to use "Mustinherit" please share with me.
thank you sir.
basam nath
[email protected]
-
When you are defining a base class you would typically use this.
For example, I have a base class which is a print event listener. Classes can be inherited from it to save the print event to a log file, or a database or to send it in an email, for example but any such class must have a method to be called when a print event occurs....therefore this is defined in the base class using MustInherit.
-
That seems similar to the Abstract keyword in C#...is that the VB.NET equivalent?
-
Yup : MustinHerit == Abstract