---
description: "Compiler Error CS1594"
title: "Compiler Error CS1594"
ms.date: 07/20/2015
f1_keywords: 
  - "CS1594"
helpviewer_keywords: 
  - "CS1594"
ms.assetid: f949a992-27a3-470d-b512-e590e5170af3
---
# Compiler Error CS1594

Delegate 'delegate' has some invalid arguments  
  
 The type of an argument passed to a [delegate](../language-reference/builtin-types/reference-types.md) invocation does not agree with the type of the parameter in the delegate declaration.  
  
 The following sample generates CS1594:  
  
```csharp  
// CS1594.cs  
using System;  
delegate string func(int i);   // declare delegate  
  
class a  
{  
   public static void Main()  
   {  
      func dt = new func(z);  
      x(dt);  
   }  
  
   public static string z(int j)  
   {  
      Console.WriteLine(j);  
      return j.ToString();  
   }  
  
   public static void x(func hello)  
   {  
      hello("8");   // CS1594  
      // try the following line instead  
      // hello(8);  
   }  
}  
```
