Compiler Error C3132

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C3132.

function-parameter' : parameter arrays can only be applied to a formal argument of type 'single-dimensional managed array'

The ParamArray attribute was applied to a parameter that was not a single-dimension array.

The following sample generates C3132:

// C3132.cpp  
// compile with: /clr /c  
using namespace System;  
void f( [ParamArray] Int32[,] );   // C3132  
void g( [ParamArray] Int32[] );   // C3132  
  
void h( [ParamArray] array<Char ^> ^ MyArray );   // OK  
  

Show: