R
Rich P
I was trying this in the KeyUp event of a textbox
(note: I am using "3", "30", "31" as char datatypes)
If "3,30,31".Contains(txt1.text).Equals(true) then
...
The problem is that if I backspace and remove all chars (where txt1.text
= "")
I am seeing that "3,30,31".Contains(txt1.text) still returns true. My
alternative is to say
If txt1.text = "3" Or txt1.Text = "30" or txt1.Text = "31" then ...
I also tried "3,30,31".IndexOf(txt1.text) and also tried
txt1.Text.IndexOf("3,30,31") but was getting inconsistent results.
What is the correct or most effective way to detect these chars?
Thanks
Rich
(note: I am using "3", "30", "31" as char datatypes)
If "3,30,31".Contains(txt1.text).Equals(true) then
...
The problem is that if I backspace and remove all chars (where txt1.text
= "")
I am seeing that "3,30,31".Contains(txt1.text) still returns true. My
alternative is to say
If txt1.text = "3" Or txt1.Text = "30" or txt1.Text = "31" then ...
I also tried "3,30,31".IndexOf(txt1.text) and also tried
txt1.Text.IndexOf("3,30,31") but was getting inconsistent results.
What is the correct or most effective way to detect these chars?
Thanks
Rich