.


:




:

































 

 

 

 


, volatile , .




using

using, using . :

using (obj) {

// obj

}

using ( obj = ) {

// obj

}

obj , , System. IDisposable. , using. using, . using obj Dispose (), System. IDisposable. , using , , . , , , using , System. IDisposable.

using.

// using.

Using System; using System.10;

class UsingDemo {

static void Main() { try {

StreamReader sr = new StreamReader("test.txt");

// using, using(sr) {

//...

}

} catch(IOException exc) {

//...

}

try {

// StreamReader using, using(StreamReader sr2 = new StreamReader("test.txt")) {

//...

}

} catch(IOException exc) {

//...

I Disposable StreamReader ( TextReader). using. Dispose () , .

, using , , . , using . , using . .NET Framework , I Disposable. using.

extern

extern . .

extern #. , , . , .

, extern. , .

extern _ _ (_);

.

extern Dll Import, DLL, . Dll Import System. Runtime. Inter op Services. , , , DLL, . , . ( C++, DLL .)

, , , . ExtMeth. , AbsMax ().

#include <stdlib.h>

int _declspec(dllexport) AbsMax(int a, int b) {

return abs(a) < abs(b)? abs(b): abs(a);

}

AbsMax () . _ declspec (dllexport). Microsoft. AbsMax () DLL, . ExtMeth. .

CL /LD /MD ExtMeth.,





:


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


:

:

, , .
==> ...

1715 - | 1413 -


© 2015-2024 lektsii.org - -

: 0.012 .