.


:




:

































 

 

 

 


Else throw new Exception();




}

catch (ExceptB exc) {

Console.WriteLine(exc);

}

catch (ExceptA exc) {

Console.WriteLine(exc);

}

catch (Exception exc) {

Console.WriteLine(exc);

}

}

}

}

.

ExceptA.

ExceptB.

System.Exception: "System.Exception".

OrderMatters.Main() <_ >: 3 6

catch. . ExceptB ExceptA, ExceptB ExceptA. , Exception (.. ) . , catch. .

catch, , . , . , , , .

checked unchecked

C# , , . , , . . .

byte a, b, result; = 127;

= 127;

result = (byte)( * b);

b byte. , ,

Result.

C# , , checked unchecked. , , , checked, unchecked. , .

checked . , . , . :

checked ()

checked {

//

}

. , OverflowException.

unchecked . , . , :

unchecked () unchecked {

// ,

}

, . , .





:


: 2016-12-03; !; : 960 |


:

:

: , .
==> ...

1340 - | 1283 -


© 2015-2024 lektsii.org - -

: 0.008 .