0
When do you use pointers in C#?
I just have a small question that might open bigger answers. In what cases you would use pointers in C#?
1 Resposta
+ 8
Honestly speaking, I didn't know C# can utilize pointers (especially use of pointer arithmetics) as C# adopted Java's way to handle memory management (using GC) and the use of reference type is something quite similar to pointers (some say, to some extent).
Your question pulled my curiosity trigger to seek for clarity, so, here's what I found from a simple search, hopefully they come worthy of reading : )
https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/unsafe-code-pointers/pointer-types
https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/unsafe-code-pointers/
https://stackoverflow.com/questions/2333574/is-there-pointer-in-c-sharp-like-c-is-it-safe
Hth, cmiiw