Web hosting isp - MyBase is commonly used to call back

MyBase is commonly used to call back into the overridden member from the member that overrides it in the derived class. The MyBase keyword can be used to call the constructor of the base class to instantiate a member of that class, as in: MyBase.New(…) VB .NET/VB 6 Differences The MyBase keyword is new to VB .NET. MyClass Keyword Syntax MyClass Description MyClass is a reference to the class in which the keyword is used. Rules at a Glance When using MyClass (as opposed to Me) to qualify a method invocation, as in: MyClass.IncSalary( ) the method is treated as if it was declared using the NotOverridable keyword. Thus, regardless of the type of the object at runtime, the method called is the one declared in the class containing this statement (and not in any derived classes). The upcoming example illustrates this difference between MyClass and Me. MyClass cannot be used with shared members. Example The following code defines a class, Class1, and a derived class, Class1Derived, each of which 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
Note: If you are looking for cheap and quality provider to host and run your java application check Astra java hosting services

Comments are closed.