摘要: C#可否对内存进行直接的操作 ?可以使用指针在这篇文章中将描述C#的一个特性指针和所谓的不安全代码。非安全代码 非安全代码就是不在 CLR 完全控制下执行的代码,它有可能会导致一些问题,因此他们必须用 “unsafe” 进行表明: unsafe { ... // unsafe context: can use pointers here ... } 在其他一些地方也可以使用关键字 ‘unsafe’,例如我们可以将类或方法表明为非安全的: unsafe class Class1 {} static unsafe void FastMove ( int* pi, int* pdi, int len 阅读全文
posted @ 2013-06-05 23:29 Mr_Chen 阅读(4057) 评论(0) 推荐(0) 编辑