all groups > visual studio .net general > september 2005 >
You're in the

visual studio .net general

group:

vb.net error check


vb.net error check spen2
9/29/2005 12:54:58 PM
visual studio .net general:
I need help with my error check

how di I check for square root of negatives in vb.net @ the user input
and display an error message

anyone please

spen

--
spen2Message posted via http://www.exforsys.com for all your training needs
Re: vb.net error check Peter van der Goes
9/30/2005 9:46:23 AM

[quoted text, click to view]

How is the user providing the input to the square root calculation? Entering
the number in a text box?
Assuming the above, simply convert the string in the text property to the
largest number type you allow using Convert.To*****, then trap the user in a
while loop, reprompting for valid input until a satisfactory number is
entered.
If this is not your scenario, please provide details.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.

AddThis Social Bookmark Button