Compiler Error CS1615
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

Compiler Error CS1615 

Error Message

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
© 2016 Microsoft