.NET has C# and VB* as (relatively) high-level languages, both of which compile to the .NET CLI intermediate code (.NET's equivalent of Java's "bytecode"), and not to native machine code. There is also C++/CLI, which lets you write code for the .NET CLI intermediate code.
These can be familiar with each other the same way C#/VB projects can, with C++/CLI code able to use C#-defined elements (classes, methods, properties) with keywords like gcnew
and notation ^
, and C#/VB code. C++/CLI allows working with pointers, memory allocation, and getting and setting the actual bytes in memory (by pointers). However, these are things that can be done with C# (and VB?) with the unsafe
keyword.
Is there a difference between the two ways? Are there things you can achieve with one but not the other? Is there a performance difference (consider both compile to intermediate .NET CLI code and not machine code)?
* when I say C#/VB, I only know the C# part so I may by wrong. I'm not familiar with VB.
Thanks in advance!