Generated VB code with EnableDataBinding problem

Sep 30, 2011 at 7:17 AM

If the generated property is a string it's OK

If it's UShort or byte or int etc I get the error 

'Is' operator does not accept operands of type 'UShort'. Operands must be reference or nullable types.

        Public Property Year() As UShort
            Get
                Return Me.yearField
            End Get
            Set(value As UShort)
                If (Not (Me.yearField) Is Nothing) Then
                    If (yearField.Equals(Value) <> True) Then
                        Me.yearField = Value
                        Me.OnPropertyChanged("Year")
                    End If
                Else
                    Me.yearField = Value
                    Me.OnPropertyChanged("Year")
                End If
            End Set
        End Property