.


:




:

































 

 

 

 


.




, , . .

using System:

namespace ConsoleApplicationi

delegate void Del (ref string s); //

class Class

{

public static void C001 (ref string s) // 1

string temp = " ";

for (int i = 0: i < s.Length: ++i)

if (s [ i ] == '0' || s [ i ]== ' 0 ') temp += '0';

else if (s [ i ] == ' I ') temp += ' 1';

else temp += s [ i j;

}

s = temp;

}

public static void Hack (ref string s) // 2

{

string temp = " ";

for (int i = 0; i < s.Length; ++i)

if (i / 2 * 2 == i) temp += char.ToUpper(s [ i ]);

else temp += s [ i ];

}

s = temp;

static void Main{

string s = "cool hackers";

Del d; //

for (int i = 0; i < 2; ++i)

{ d = new Del(COOl); // 1

if (i == 1) d = new Del(Hack); // 2

d(ref s); //

Console.WriteLine(s);

} }

.

:

, ;

;

, ;

. . . 10.1 , .

, . , , .

Combine, System.Delegate, , , .

 

 

.

. (application roots) . .

, . , ( ). . , . .

:

0 (generation 0). , , : 1 2.

0. , , 0. 1 , , 0 . 1, 2. 2 , 0 1

 

 

IDisposable.

, Finalize , . .NET IDisposable Dispose, :

Public Interface IDisposable

Sub Dispose()

End Interface

, :

, IDisposable, Dispose.

8, Dispose , Component, , .

.NET Framework, IDisposabe (, Dispose, ), IDisposable .

System.GC

, .

, , . , , .

, . , , , . , . , Collect.

:

) , .

) , .

) , , .

, . , , , .

 

 





:


: 2016-07-29; !; : 458 |


:

:

80% - .
==> ...

1539 - | 1386 -


© 2015-2024 lektsii.org - -

: 0.014 .