to find the input is negative or positive

  • Thread starter Thread starter Guest
  • Start date Start date
Hi bafidi,

You can either look for the negative sign or Parse the TextBox for a number and compare it to 0.

See: String.IndexOf and Int32.Parse
 
Options
1. Convert to a numeric type and do a test to see whether smaller or larger
than 0.
2. Pull as bytes and test the bytes (you can creatively use bitwise
operations ;->)

Of the two, #1 is easier, but #2 is much cooler. ;->

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Back
Top