I’m wondering if anyone can give me a good example of using pointers in C# in .Net and why you chose to use pointers?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This isn’t really a question to specific to ASP.NET.
If you are going to use pointers in .NET, the predominant reason is that you have an interop scenario where it is going to be easier to use pointers in unsafe code instead of IntPtr instances.
The second most popular (and distant) reason is because you might actually have a performance gain in processing large amounts of data in unsafe code than in managed code. Image processing algorithms are a good example of this.