Compiler Error CS0196
A pointer must be indexed by only one value
A pointer cannot have multiple indices. For more information, see Pointer types
The following sample generates CS0196:
C#
// 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];
}
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: