Torna al Thread
Public Class Persona
Public redditoLordo As Double
Public redditoNetto As Double
Public detrazioneLavoro As Double
' Public detrazioni As Double
Public detrazioneConiuge As Double
Public statoCivile = False
Public Property isSposato() As Boolean ' se la persona è sposata, ha diritto a una detrazione di 690 €, altrimenti no (detrazione=0)
Get
Return statoCivile
End Get
Set(ByVal value As Boolean)
statoCivile = value
End Set
End Property
Public Function Sposato() As Boolean
Dim objPersona As New Persona
If isSposato = True Then
Return True
statoCivile = True
objPersona.detrazioneConiuge = 690
End If
If isSposato = False Then ' se
Return False
statoCivile = False
objPersona.detrazioneConiuge = 0
End If
End Function
End Class