Is C++/CLI's pin_ptr the equivalent of C#'s fixed statement?
Yes, pretty much.
Some differences:
fixed statement creates its own scope block. pin_ptr's scope is from its initialization to the
end of the enclosing block.fixed is an explicit language feature. pin_ptr is a use of a general language feature (C++ templates).There are probably more differences like the above. But, when translating between the two languages, they are generally equivalent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With