I made the following serial nested xml, using as an example Serializing Nested XML - CodeProject
The situation on how to invoke the List - ProcCode in Visual Basic Commands.
Your help will be greatly appreciated.
VB.NET:
Imports System.Xml.Serialization
Imports System.Xml
<Serializable()> _
Public Class clsTranReq
Private TranTypeString As String
<Xml.Serialization.XmlElement("TranType")> _
Public Property TranType() As String
Get
TranType = TranTypeString
End Get
Set(ByVal Value As String)
TranTypeString = Value
End Set
End Property
Private PanString As String
<Xml.Serialization.XmlElement("PAN")> _
Public Property PAN() As String
Get
PAN = PanString
End Get
Set(ByVal Value As String)
PanString = Value
End Set
End Property
<Xml.Serialization.XmlElement("ProcCode")> _
Public ProcCode As List(Of ProcCode)
Public Sub New()
ProcCode = New List(Of ProcCode)
End Sub
End Class
VB.NET:
Public Class ProcCode
Private _type As String
Private _value As String
<System.Xml.Serialization.XmlAttributeAttribute()> _
Public Property type() As String
Get
Return _type
End Get
Set(ByVal value As String)
_type = value
End Set
End Property
<System.Xml.Serialization.XmlTextAttribute()> _
Public Property value() As String
Get
Return _value
End Get
Set(ByVal value As String)
_value = value
End Set
End Property
End Class
The situation on how to invoke the List - ProcCode in Visual Basic Commands.
VB.NET:
Dim p As New clsTranReq
p.TranType = "Authorization"
p.PAN = "12345"
p.ProcCode. [COLOR="red"]<---- What should be the commans to set the value and type.[/COLOR]
Your help will be greatly appreciated.
Last edited by a moderator: