error XS0019
Posted: Tue Dec 02, 2025 9:23 pm
I tried to prevent user to enter non-numeric characters in numeric textbox and put this code in TextBox_KeyPress method:
IF !Char.IsDigit(e.KeyChar) .AND. e.KeyChar != '.'
e.Handled := TRUE
ENDIF
IF e.KeyChar == ','
e.Handled := TRUE
ENDIF
and I got this error message:
error XS0019: Operator '!=' cannot be applied to operands of type 'char' and 'string'
error XS0019: Operator '==' cannot be applied to operands of type 'char' and 'string'
What is right operand?
Zeljko
IF !Char.IsDigit(e.KeyChar) .AND. e.KeyChar != '.'
e.Handled := TRUE
ENDIF
IF e.KeyChar == ','
e.Handled := TRUE
ENDIF
and I got this error message:
error XS0019: Operator '!=' cannot be applied to operands of type 'char' and 'string'
error XS0019: Operator '==' cannot be applied to operands of type 'char' and 'string'
What is right operand?
Zeljko