Click here to Skip to main content
15,884,743 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I know what the managed code and unmanaged code is.
Managed Code that targets the CLR, and Unmanaged Code that doesn't target.

Can someone please explain a bit in detail, that how can we actually create unmanaged code, because whenever we code, we build, run .... but by default it targets CLR. The functionality goes normally, then how can we create an unmanaged code. ?

i need real examples of both....

please help...thanks in advance.
Posted

1 solution

You don't create unmanaged code with .NET - which means C#, VB etc do not create unmanaged code.

You create unmanaged code in Native applications, which basically means C++. All you can do is interface with unmanaged code from a C# or VB application.

If you want an example of unmanaged code, google is full of it!
 
Share this answer
 
Comments
DMember 31-May-14 6:56am    
Thanks OriginalGriff, what will happen when i run my c++ code in visual studio..?? will that target CLR or not..!!

Also i googled and got to know that any code that is written, complied outside the .net framework will be unmanaged, am i right..??
[no name] 31-May-14 10:15am    
How would you expect anyone to answer the first question? If you don't want to target the CLR then configure your project to not target the CLR. We cannot see your project to tell you if you are or are not targeting the CLR.
What does that even mean? .NET code is managed, code that is not .NET is unmanaged by definition.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900