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:
C#
// CS1615.cs
class C
{
public void f(int i) {}
public static void Main()
{
int i = 1;
f(ref i); // CS1615
}
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: