Compiler Error CS0443
Syntax error, value expected
This error occurs when you reference an array without specifying a value for the array index.
The following code generates CS0443.
// CS0443.cs
using System;
class MyClass
{
public static void Main()
{
int[,] x = new int[1,5];
if (x[] == 5) {} // CS0443
// if (x[0, 0] == 5) {}
}
}
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: