Reputation: 15457
I got a positive result when ctrl.Text happened to be an empty string (value was 0)
Is that the correct behavior? Do I need to check for an empty string?
"Next|Prev|First|Last|Search".IndexOf(ctrl.Text) > -1
Upvotes: 3
Views: 2632
Reputation: 11051
Yes, in the msdn you will find.
if value is String.Empty, the return value is 0.
Upvotes: 12