NotOverridable Prohibits overriding of the member. This is
Visual Basic looks for the most immediate version in parent classes of the procedure in question. Thus, if Class C derives from Class B, which derives from Class A, a call in Class C to: MyBase.AProc first looks in Class B for a matching procedure named AProc. If none is found, then VB looks in Class A for a matching procedure. (By matching, we mean a method with the same argument signature.) The keyword MyClass provides a reference to the class in which the keyword is used. It is similar to the Me keyword, except when used to call a method. To illustrate the difference, consider a class named Class1 and a derived class named Class1Derived. Note that each class has an IncSalary method: Public Class Class1 Public Overridable Function IncSalary(ByVal sSalary As Single) _ As Single IncSalary = sSalary * CSng(1.1) End Function Public Sub ShowIncSalary(ByVal sSalary As Single) MsgBox(Me.IncSalary(sSalary)) MsgBox(MyClass.IncSalary(sSalary)) End Sub End Class Public Class Class1Derived Inherits Class1 Public Overrides Function IncSalary(ByVal sSalary As Single) _ As Single IncSalary = sSalary * CSng(1.2) End Function End Class Now consider the following code, placed in a form module: Dim c1 As New Class1( ) Dim c2 As New Class1Derived( ) Dim c1var As Class1 c1var = c1 c1var.IncSalary(10000) ‘ Shows 11000, 11000 c1var = c2 c1var.IncSalary(10000) ‘ Shows 12000, 11000 The first call to IncSalary is made using a variable of type Class1 that refers to an object of type Class1. In this case, both of the following calls: Me.IncSalary MyClass.IncSalary return the same value, because they both call IncSalary in the base class Class1.
Hint: If you are looking for high quality and reliable webspace provider to host and run your jsp hosting application check Virtualwebstudio jsp web hosting provider