We help IT Professionals succeed at work.

How to define behaviour of Parent Class?

LeighWardle
LeighWardle asked
on
147 Views
Last Modified: 2014-08-25
Hi Experts,

Here is an outline of my code:

Public Class clsLicence

    Public Property strProgramNameAndMajorVersion() As String
	
End Class

Public Class clsLicenceSentinel

	Inherits clsLicence
	
    Public Property strProgramNameAndMajorVersion() As String
        Get
		'....
		End Get
        Set(ByVal Value As String)
		'....
        End Set
    End Property
	
End Class

Public Class clsLicenceSoftwareKey

	Inherits clsLicence
	
    Public Property strProgramNameAndMajorVersion() As String
        Get
		'....
		End Get
        Set(ByVal Value As String)
		'....
        End Set
    End Property
	
End Class

Open in new window


So I have 2 Child classes, clsLicenceSentinel and clsLicenceSoftwareKey, with Parent Class, clsLicence.

How do I define Property strProgramNameAndMajorVersion()  so that the appropriate definition in the Child class is used?

Regards,
Leigh
Comment
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Thanks, ChloesDad.
Just what  I needed.
Cheers, Leigh
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.