6.1
1, 15 | 5, 12 | 1, 10 | |||
2, 14 | 6, 11 | 2, 9 | |||
3, 12 | 7, 10 | 3, 8 | |||
4, 11 | 8, 9 | 4, 7 | |||
5, 10 | 3, 15 | 5, 6 | |||
6, 9 | 4, 14 | 2, 13 | |||
7, 8 | 5, 13 | 3, 12 | |||
2, 15 | 6, 12 | 4, 11 | |||
3, 14 | 7, 11 | 5, 10 | |||
4, 13 | 8, 10 | 6, 9 |
7
Visual C#
7.1.
Visual C# - ,
7.2.
() ( , ..) . . , - . , ( if then) exit, - , - . , , . Windows NT - (). , .
, , - - , -
, . . # - . - # , , Ctrl^C. - , -
. , , . - .
.
. , , - , , , , , - . -
|
|
, . - , - - , .
, -
throw. - C# :
ArithmeticException ( DivideByZeroException OverFlo- wException);
ArrayTypeMismatchException ;
DivideByZeroException ;
FormatException ;
IndexOutOfRangeException ;
InvalidCasrException ;
OutOfMemoryException ;
OverFlowException ;
StackOverFlowException .
System. SystemException. - try, - :
try [ catch] [ finally]
catch, finally,
. try :
1) , -
try. . , - , .
2) - catch, , .
3) finally , .
:
1. . , , . ,
try, , - .
2. , - .
3. finally, ( - , ).
4. , -
. . .
try. catch, . - . catch , , . catch:
|
|
catch ( ) { // } catch () { // } catch () { // }
, -
- , . , . - .
-
. . , - , . - , .
, ,
finally ( ), , try. , . - , , , - .
try . - , try - catch, , . - , , ,
. - throw, :
throw[]
catch . , throw, - , :
throw new DivideByZeroException();
throw ,
0 new.
throw , - , System.Exception - . .
. , , throw, , catch, - .
7.3.
-
( , ,
..).
8 ( )