Link to home
Start Free TrialLog in
Avatar of svemir
svemir

asked on

Problem with Inheritance

Hello!
I have a base class called clsBoiler. Another class inherits clsBoiler. Segments of code are given bellow.

'List of Derived Class (All Classification Classes are derived from Boiler Class)
<XmlInclude(GetType(clsDNV)), XmlInclude(GetType(clsLR)), XmlInclude(GetType(clsGL)), _
 XmlInclude(GetType(clsRINA)), XmlInclude(GetType(clsBV)), _
 Serializable()> Public Class clsBoiler
    '
    Public Description As String    'Calculation description as to be shown in cmbCalculations
    'General Boiler Data
    Public p As Double              'Design Pressure
    Public WorPress As Double       'Working Pressure
    Public HydPress As Double       'Hydraulic Pressure
    Public T As Double              'Design Temperature
    Public Capacity As Double       'Capacity
    Public D_des As Double          'Design Diameter
    Public VesClass As Integer = 1  'Vessel Class (1,2 or 3)
    'Class Society Data
    Public Name As String           'Name
    Public ClassID As Integer       'ClassID in Template List (XML Document)
    Public Book As String           'Book
    Public Version As String        'Version
    Public Part As String           'Part
    Public Chapter As String        'Chapter
    'Calculation Book Keeping Data
    Public Mark As String           'Mark
    Public Revision As String       'Revision
    Public ResPerson As String      'Responsible Person
    Public QuaAssurance As String   'QA Person
    Public ModBy As String          'Modified by (Person)
    Public ModDate As String        'Modification Date
End Class

<Serializable()> Public Class clsDNV
    'Inherits Base Class
    Inherits clsBoiler
    Public CylShells As clsCylShell     'Cylindrical Shells
End Class

If I at design time define actProject as clsBoiler and at run time assigne value of clsDNV to it, how I can access to variable CylShells at design time?

Thanks in advance, Svemir.

ASKER CERTIFIED SOLUTION
Avatar of RJeyaPrakash
RJeyaPrakash

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial