我正在编写一个使用树数据结构的应用程序.我用C++编写它,现在我想用C#编写它.我使用指针来实现树数据结构.C#中还有一个指针吗?使用它安全吗?
我正在使用C#,而且我无法从像C++这样的特定点开始发送数组,这很烦人.
假设这段代码:
int[] array = new int[32];
foobar (array + 4); //send array starting from the 4th place.
Run Code Online (Sandbox Code Playgroud)
这是C#的一种奇怪的语法,因为我们没有任何可用的指针,但肯定有办法吗?有.Skip(),但我认为它产生了一个新的数组,这是我不喜欢的.
我有什么选择?