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

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -