2 개의 공용 속성을 가진 간단한 기본 클래스 B가 있습니다. 이 클래스는 또 다른 공용 속성을 추가하는 다른 클래스 D에 의해 상속됩니다. 파생 클래스는 웹 서비스 호출에 의해 반환됩니다. ASP.Net에서 생성 된 페이지는 다음과 같습니다.Asp.Net/WSE asmx 페이지 생성기를 만드는 방법 파생 클래스에서 기본 클래스 속성을 추가하십시오.
'''<remarks/>
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.3074"), _
System.SerializableAttribute(), _
System.Diagnostics.DebuggerStepThroughAttribute(), _
System.ComponentModel.DesignerCategoryAttribute("code"), _
System.Xml.Serialization.XmlTypeAttribute([Namespace]:="")> _
Partial Public Class D
Inherits B
Private guidField As String
'''<remarks/>
Public Property Guid() As String
Get
Return Me.guidField
End Get
Set(ByVal value As String)
Me.guidField = value
End Set
End Property
End Class
'''<remarks/>
<System.Xml.Serialization.XmlIncludeAttribute(GetType(D)), _
System.Xml.Serialization.XmlIncludeAttribute(GetType(B)), _
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.3074"), _
System.SerializableAttribute(), _
System.Diagnostics.DebuggerStepThroughAttribute(), _
System.ComponentModel.DesignerCategoryAttribute("code"), _
System.Xml.Serialization.XmlTypeAttribute([Namespace]:="")> _
Partial Public MustInherit Class B
Private nameField As String
Private descriptionField As String
'''<remarks/>
Public Property Name() As String
Get
Return Me.nameField
End Get
Set(ByVal value As String)
Me.nameField = value
End Set
End Property
'''<remarks/>
Public Property Description() As String
Get
Return Me.descriptionField
End Get
Set(ByVal value As String)
Me.descriptionField = value
End Set
End Property
End Class
클래스 B의 클래스 D와 클래스 D의 모든 공용 속성을 표시하는 방법이 있습니까? 클래스 D만이 웹 서비스 클라이언트에 유용합니다. 클래스 B는 보이지 않아야합니다. 고마워요