更新:2007 年 11 月
错误消息
指针必须只根据一个值进行索引
指针不能有多个索引。有关更多信息,请参见指针类型(C# 编程指南)
下面的示例生成 CS0196:
// CS0196.cs
public class MyClass
{
public static void Main ()
{
int *i = null;
int j = 0;
j = i[1,2]; // CS0196
// try the following line instead
// j = i[1];
}
}