This documentation is archived and is not being maintained.

Compiler Error CS0674 

Error Message

Do not use 'System.ParamArrayAttribute'. Use the 'params' keyword instead.

The C# compiler does not allow the use of System.ParamArrayAttribute; use params instead.

The following sample generates CS0674:

// CS0674.cs
using System;
public class MyClass 

   public static void UseParams([ParamArray] int[] list)   // CS0674
   // try the following line instead
   // public static void UseParams(params int[] list) 
      for ( int i = 0 ; i < list.Length ; i++ )

   public static void Main() 
      UseParams(1, 2, 3);