This documentation is archived and is not being maintained.

Compiler Error CS1615

Argument 'number' should not be passed with the 'keyword' keyword

One of the keywords ref or out was used when the function did not take a ref or out parameter for that argument. To resolve this error, remove the incorrect keyword and use the appropriate keyword that matches the function declaration, if any.

The following sample generates CS1615:

// CS1615.cs
class C
{
   public void f(int i) {}
   public static void Main()
   {
      int i = 1;
      f(ref i);  // CS1615
   }
}
Show: