I am generating XSD from the below class. How do I make the FirstName and LastName attributes "Required" when it generates the xsd.
<Serializable()> _
<XmlRoot("Persons")> _
Public Class Persons
Public Sub New()
Items = New List(Of PersonsDetails)()
End Sub
Private _Items As List(Of PersonsDetails)
<XmlElement("Person")> _
Public Property Items() As List(Of PersonsDetails)
Get
Return _Items
End Get
Set(ByVal value As List(Of PersonsDetails))
_Items = value
End Set
End Property
End Class
Public Class PersonsDetails
Private _fName As String
Private _lName As String
Private _city As String
Private _state As String
Private _id As Integer
<XmlAttribute("ID")> _
Public Property ID() As Integer
Get
Return _id
End Get
Set(ByVal value As Integer)
_id = value
End Set
End Property
<XmlAttribute("FirstName")> _
Public Property FirstName() As String
Get
Return _fName
End Get
Set(ByVal value As String)
_fName = value
End Set
End Property
<XmlAttribute("LastName")> _
Public Property LastName() As String
Get
Return _lName
End Get
Set(ByVal value As String)
_lName = value
End Set
End Property
<XmlAttribute("City")> _
Public Property City() As String
Get
Return _city
End Get
Set(ByVal value As String)
_city = value
End Set
End Property
<XmlAttribute("State")> _
Public Property State() As String
Get
Return _state
End Get
Set(ByVal value As String)
_state = value
End Set
End Property
End Class