diff options
author | Ravi Pratap M <ravi@mono-cvs.ximian.com> | 2001-10-17 13:20:07 +0400 |
---|---|---|
committer | Ravi Pratap M <ravi@mono-cvs.ximian.com> | 2001-10-17 13:20:07 +0400 |
commit | 8192342a2b017f4cfc7adcce6170981bc12d3f7e (patch) | |
tree | 2aedebb56bc3177454d7ddf31294b8a91ca5730e /mcs/errors/cs1593.cs | |
parent | 0c096f73e3c76c70c5ff2d816475d8c8146b8e86 (diff) |
Add files for delegate related errors.
svn path=/trunk/mcs/; revision=1173
Diffstat (limited to 'mcs/errors/cs1593.cs')
-rw-r--r-- | mcs/errors/cs1593.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mcs/errors/cs1593.cs b/mcs/errors/cs1593.cs new file mode 100644 index 00000000000..755cd703170 --- /dev/null +++ b/mcs/errors/cs1593.cs @@ -0,0 +1,30 @@ +// cs1593.cs : Delegate 'Blah.MyDelegate' does not take '1' arguments +// Line : 21 + +using System; + +public class Blah { + + public delegate int MyDelegate (int i, int j); + + public int Foo (int i, int j) + { + return i+j; + } + + public static int Main () + { + Blah i = new Blah (); + + MyDelegate del = new MyDelegate (i.Foo); + + int number = del (2); + + if (number == 5) + return 0; + else + return 1; + + } + +} |