This documentation is archived and is not being maintained.

Compiler Error C2690

'operator' : cannot perform pointer arithmetic on a __gc array

Pointer arithmetic is not allowed on a __gc array. Use array index notation to traverse the array.

The following sample generates C2690:

// C2690.cpp
// compile with: /clr
#using <mscorlib.dll>
using namespace System;

int main()
   String* x[] = new String*[10];
   x[0] = "test";
   x++;   // C2690