Add Papers Marked0
Paper checked off!

Marked works

Viewed0

Viewed works

Shopping Cart0
Paper added to shopping cart!

Shopping Cart

Register Now

internet library
Atlants.lv library
FAQ
2,99 € Add to cart
Add to Wish List
Want cheaper?
ID number:458413
 
Evaluation:
Published: 31.10.2008.
Language: Latvian
Level: Secondary school
Literature: n/a
References: Not used
Extract

Tradicionālā izņēmumu situāciju apstrāde nav ērta, jo programmas kods ir slikti saprotams un kļūdas kodi parasti nenes nekādas informācijas, piemēram:
int ErrorCode=0;
int n = int.Parse(textBox1.Text);
int m = int.Parse(textBox2.Text);
if (m == 0)
ErrorCode = 1;
else if (n > 200 || m > 200)
ErrorCode = 2;
else
{
int z = n / m;
label1.Text = z.ToString();
}
switch (ErrorCode)
{
case 1: MessageBox.Show("Division by zero"); break;
case 2: MessageBox.Show("Memory overflow"); break;
NET Framework paredz izņēmumu apstrādi ar klasēm, kuros ir definētas dažādas izņēmumu situācijas, piemēram:
OutOfMemoryException – trūkst atmiņas turpmākai programmas izpildīšanai.…

Load more similar papers

Atlants

Choose Authorization Method

Email & Password

Email & Password

Wrong e-mail adress or password!
Log In

Forgot your password?

Draugiem.pase
Facebook

Not registered yet?

Register and redeem free papers!

To receive free papers from Atlants.com it is necessary to register. It's quick and will only take a few seconds.

If you have already registered, simply to access the free content.

Cancel Register