更新:2007 年 11 月
错误消息
stackalloc 表达式在类型后要求有 []使用
下面的示例生成 CS1575:
// CS1575.cs
// compile with: /unsafe
public class MyClass
{
unsafe public static void Main()
{
int *p = stackalloc int (30); // CS1575
// try the following line instead
// int *p = stackalloc int [30];
}
} | |