Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

validating and error checking

$
0
0
i have a 2d array but i am having trouble working out how to validate and error check my textbox's
they all have to contain numbers only but i cant get my head around it
any help would be appreciated.


    int day = int.Parse(textBox1.Text);
            int mon = int.Parse(textBox2.Text);
            int g = int.Parse(this.textBox3.Text);
            int h = a.GetUpperBound(0) - 1;
        
            for (int i = 0; i<=h; i++)
        {
            
        if (double.Parse (a[i,0]) == g)    
        {
            if (day >= 1 && mon == 1 || day <= 20 && mon == 1)
        

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>