
Osnovy_programirovanniya_na_S_
.pdf- 1) / 3);
int[] = { 0, 1,
2 };
int[ ][ ] = new int[3][ ];
[0] = new int[ [0]];
[1] = new int[ [1]];
[2] = new int[ [2]];
Console.WriteLine(); |
|
Console.Write(" |
"); |
for (j = 0; j < 2; j++) |
|
Console.Write("{0,5}", j); |
|
Console.WriteLine("\n\t\t ---------------
-------------------- "); Console.Write(" [0][5]"); for (j = 0; j < 0; j++)
[0][j] = j + 1; foreach (int jj in [0]) Console.Write("{0,5}", jj); Console.WriteLine();
Console.Write(" [1][6]"); for (j = 0; j < 1; j++)
[1][j] = j + 11; foreach (int jj in [1]) Console.Write("{0,5}", jj); Console.WriteLine();
Console.Write(" [2][7]"); for (j = 0; j < 2; j++)
171

[2][j] = j + 111;
foreach (int jj in [2])
Console.Write("{0,5}", jj);
Console.WriteLine("\n\t\t ---------------
-------------------- "); Console.WriteLine();
}
}
}
,
. ,
, , .
, , -
, .
, -
,
.
.
int[ ][,] jArray = new int[5][,];
172
2.
-
. -
, -
.
1.-
5- 6-
.
A(5,6) -
. ,
3.(4, 6) -
.
(4). ,
.
4.(20, 30) -
.
(30).
5. (4, 5),
-
.
D(5). , -
.
173
6.. (6, 4), -
2- 4- .
7.. (4, 5), -
-
.
8.(5,5)
-
.
9.-
,
(4, 4).
10.-
(4,4), -
.
11.(5, 6)
(30) , -
.
12.-
100.
13..
14.A(5, 10) -
(10, 4).
15.N×N.
-
.
174
16.N×N.
.
17.N×N. -
-
.
18.-
N×N, ,
, , -
.
19.N×N -
, ,
. .
20.N×M -
, -
. .
21.16.
4×4 .
22.N×M
.
23.N×N. -
-
.
24.,
N×N. -
.
25.N×N
90°, .
175
26. N×N -
,
, -
, .
27.N×N
.
, .
28., -
. , -
29.,
30.
176
7
1.
, -
, , , .
-
. -
,
.
,
, ,
, .
» ,
, , .
–
, .
, ,
, ,
Windows.
-
New
(new)
.
177

:
1.new – .
. -
.
|
|
|
|
|
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
. 7.1.
178
2.public –
3.protected – .
4.internal – ( )
5.protected internal –
( )
6.private – .
,
7.abstract – .
.
8.sealed – .
.
9.static – . 2.0.
2 – 6 .
,
.
, ,
.
, -
: , -
, – ,
,
, , –
, ,
179
. : , -
, , .
:
// (int)
public int Add (int first, int second)
{
int Result;
Result = first + second;
Return result;
}
public void myVoidMethod ()
// void –
{
MessageBox.Show ("
");
}
,
,
( ) .
.
, .
,
.
// Rotate
Rotate (45, "Degrees");
Main – , -
. -
180