New to c#

Re: New to c#

Post by Sector on Fri Sep 17, 2010 11:47 am
([msg=45978]see Re: New to c#[/msg])

SaneSmile wrote:
I think ive found 'The break' when you input the data the variables effect the output so i used 12, 4 and -7000
which gave out negative values for the ceiling the shortest wall, the total area and the volume

i think that you could have used an if statment after the data is entered to make sure that theirs no invalid data?
what you think?

Yeah, a negative number on one or two of the values would do the job. If you really wanted to mess it up, try non-numeric input.

And yep, you could check for validity using if/else, or regular expressions, or (seeing as it's C#) TryParse() - any of these would work.
New User
New User
Posts: 30
Joined: Mon Jul 19, 2010 5:58 am
Blog: View Blog (0)


Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests