Difference between managed code and Unmanaged code
this blog, I’m explaining about managed code and unmanaged
code in C#.
Managed code is executed under the control of
CLR (Common language Runtime).
There is no explicit memory allocation and de-allocation.
There is no explicit call to the garbage
code= .NET Programs
Code that is directly executed by the operating system is
known as unmanaged code or unsafe code.
Unsafe code is code which does not execute under full
control CLR. It can cause some problems therefore each use must be marked as unsafe.
Fixed: In an
unsafe context, the fixed keyword can be used to temporarily fix a variable so
that its address may be found.
Right click on your project >>properties>> go to
the build tab>> check unsafe code checkbox
value = str)
char* ptr = value;
(*ptr != '\0')