1.9. Unsafe codes and real time programs

.NET literature uses the term 'unsafe code' to refer to code which involves pointer operations. [44] Only certain .NET languages, including C# and Visual C++ .NET, support unsafe coding. [45]

[44] C/C++ programmers will be familiar with pointers (and the bugs they often bring). As for Java programmers, pointers (or, more accurately, pointer variables) are just variables which contain the memory addresses of another variable.

[45] In C#, unsafe codes must be used within code blocks marked with the unsafe keyword.

Using pointer operations, you can perform some tweaking to optimize your codes. A good example is implementing your array 'object' on the stack (like Java, arrays are objects in the various .NET ...

Get From Java to C#: A Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.