Does .NET Micro Framework support unsafe code? In other words, can I use pointers in my code for .NET Micro Framework?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
From the Wikipedia page (emphasis mine):
For example, the platform does not support symmetric multiprocessing, multi-dimensional arrays, machine-dependent types, or unsafe instructions.
The technical white paper lists it in the omitted features too.
回答2:
Although officially not supported, I have personally used and tested unsafe code in NETMF 4.2 and find that it works as expected.
Another developer provides sample code for implementing a BitConverter
class on NETMF doing just this:
http://forums.netduino.com/index.php?/topic/308-bitconverter/