1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| Public Class Fourchette
Private mMin As Int32
Private mMax As Int32
Public Sub New(ByVal pMin As Int32, ByVal pMax As Int32)
If pMin > pMax Then
Throw New ArgumentException("min doit être <= max")
End If
mMin = pMin
mMax = pMax
End Sub
Public Property Max() As Int32
Get
Return mMax
End Get
Set(ByVal value As Int32)
mMax = value
End Set
End Property
Public Property Min() As Int32
Get
Return mMin
End Get
Set(ByVal value As Int32)
mMin = value
End Set
End Property
Public Overrides Function ToString() As String
Return mMin & " - " & mMax
End Function
End Class |
Partager