读书人

怎么从父类派生出一个子类

发布时间: 2012-01-05 22:36:54 作者: rapoo

如何从父类派生出一个子类?
Imports Ryobi.Hsc.Wxs.Cmn.WxsCmnChstd
Public Class PatientProblemList
Inherits List(Of PatientProblem)
Friend Sub New()
End Sub

Public Function GetSyakudo() As List(Of PatientProblem)
Dim clsPatientProblemList As New List(Of PatientProblem)
For i As Integer = 0 To MyBase.Count - 1
clsPatientProblemList.Add(Me.Item(i))
Next
Return clsPatientProblemList
End Function
End Class


这样写对么?
基类是 PatientProblem
现在想派生出一个 PatientProblemList
流程图是
PatientProblem-----〉PatientProblemList-------〉GetPatientProblemList
Inherits List(Of PatientProblem)

[解决办法]
Inherits List(Of PatientProblem) 不对,基类是 PatientProblem 就应该是 Inherits PatientProblem.

读书人网 >VB Dotnet

热点推荐