|
-
March 22nd, 2021, 11:00 AM
#5
Re: What is the counterpart of this C pointer programme in C#?
 Originally Posted by wolle
One of the main goals of both Java and its follow-up C# is to be resilient to programmer errors. For this reason, you cannot do things like &i and *p. Explicit references and pointers were deemed dangerous and are not part of those languages.
While it's true that references and pointers are deemed dangerous and not part of managed coding in C#, more reading on the topic reveals that we can still work with concepts like address-of and indirection operators. It's only that they are shifted to the unsafe category coding. They still retained the control on programmers to work with references and pointers in certain exceptional situations using extreme caution. Here's a reference to a tutorial I found: https://docs.microsoft.com/en-us/dot.../pointer-types
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|