vb.net - Why is this IsNum function wrong? -
private function isnum(textbox textbox, name string) boolean if isnumeric(textbox) = false messagebox.show(name & " not number.", "entry error") textbox.select() return false else return true end if end function
after writing function, apparently wrote in way if make number doesn't think it's number. there better way write it's not confusing , incorrect?
you need check text inside textbox. not textbox itself.
do instead..
if isnumeric(textbox.text) = false
Comments
Post a Comment