Private Class a Public Enum MyColour Red Blue End Enum Public Property OriginalColour As MyColour? Public Property NewColour As MyColour? Public ReadOnly Property HasColourChanged As Boolean Get 'If both have values test If (OriginalColour.HasValue And NewColour.HasValue) Then 'Test if the values are the same If OriginalColour.Value = NewColour.Value Then Return False Else Return True End If End If 'Either one or both values are null If OriginalColour.HasValue Xor NewColour.HasValue Then Return True Else Return False End If End Get End Property End Class
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)