vb.net - Find Min/Max from 1 textbox -


i'm trying find min/max value of textbox has 1 variable , display user, variable changes everytime button clicked. how find maximum value of changing? trick can not use if statements or case statements. i'm totally @ loss here.

ok, things limit you.

  • one variable
  • no if/case statements

the lesson seems revolve around using math.max().

math.max(), can see on msdn returns

the larger of 2 32-bit signed integers.

the 1 variable going use needs exist outside of button's click event. so, make class variable.

this variable store largest value. math.max() returns largest of 2 values... see getting @ here? can pass current largest variable parameter math.max() without issues.


example:

dim max integer  max = math.max(1, 100) 'max 100 max = math.max(max, 10) 'max 100 max = math.max(max, 1000) 'max 1000 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -