From Unmanaged, unsafe to Managed, safe...

  • Thread starter Thread starter SpotNet
  • Start date Start date
S

SpotNet

Hi Newsgroup,

General C# questions. If I have a class(es), of API functions just as they
are. Would that be considered Unmanaged or unsafe (not meant as the c#
keyword) code? If I implement error checking, and disposing appropriate
resources for those functions would my program then be considered managed
(or safe)?

In general I'd like to ask (not just with API functions) can you construct
an assembley that would confirm to the definition (I don't really know it)
of Managed code with respect to the .NET Framework, from using unmanaged
resources? So that if you passed that assemebley to someone else, you could
say, it's managed and hence safe. If it can, what guide lines should be
followed?

SpotNet
 
Code executing under the control of the runtime is called managed code.
Conversely, code that runs outside the runtime is called unmanaged code. COM
components, ActiveX interfaces, and Win32 API functions are examples of
unmanaged code. Runtime here is called Common Language Runtime ( CLR )
 
Thank you very much Vadym.

SpotNet

Vadym Stetsyak said:
Code executing under the control of the runtime is called managed code.
Conversely, code that runs outside the runtime is called unmanaged code.
COM
components, ActiveX interfaces, and Win32 API functions are examples of
unmanaged code. Runtime here is called Common Language Runtime ( CLR )
 
Back
Top