J
Jumping Matt Flash
I'm trying to achieve a property within a class which returns a conditional
result dependent on the class members values.
I will explain..
Public Class Address
Private addrCountry As String
Public Property Country() As Country
Get
Return addrCountry
End Get
Set(ByVal newCountry As Country)
Me.addrCountry = newCountry
End Set
End Property
ReadOnly Property Errors() As Boolean
Get
If Me.Country.HasErrorsThen
Return True
Else : Return False
End If
End Get
End Property
End Class
The problem I'm facing is that when i return the class, in the case of my
ASP.NET web service, the Errors value is not included in my XML output. As
the variable is a readonly one i cannot set it to something to return it but
if i change it to not readonly i'll defeat the object of the Errors property
always returning the correct value.
TIA
Matt
result dependent on the class members values.
I will explain..
Public Class Address
Private addrCountry As String
Public Property Country() As Country
Get
Return addrCountry
End Get
Set(ByVal newCountry As Country)
Me.addrCountry = newCountry
End Set
End Property
ReadOnly Property Errors() As Boolean
Get
If Me.Country.HasErrorsThen
Return True
Else : Return False
End If
End Get
End Property
End Class
The problem I'm facing is that when i return the class, in the case of my
ASP.NET web service, the Errors value is not included in my XML output. As
the variable is a readonly one i cannot set it to something to return it but
if i change it to not readonly i'll defeat the object of the Errors property
always returning the correct value.
TIA
Matt