Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRavi Pratap M <ravi@mono-cvs.ximian.com>2001-10-18 16:32:07 +0400
committerRavi Pratap M <ravi@mono-cvs.ximian.com>2001-10-18 16:32:07 +0400
commitdee882485ee4739de1b1a141241624adc372f804 (patch)
tree2c4c6c17c7f79aaf757be57bda2528248d7c2f3c /mcs/tests/test-26.cs
parent0bc9bc3bef1876da40909387c023dd1ef89688c4 (diff)
2001-10-18 Ravi Pratap <ravi@ximian.com>
* test-26.cs : Update to test delegate creation from another delegate. svn path=/trunk/mcs/; revision=1179
Diffstat (limited to 'mcs/tests/test-26.cs')
-rw-r--r--mcs/tests/test-26.cs14
1 files changed, 10 insertions, 4 deletions
diff --git a/mcs/tests/test-26.cs b/mcs/tests/test-26.cs
index bbf6ec85505..8914ae61a81 100644
--- a/mcs/tests/test-26.cs
+++ b/mcs/tests/test-26.cs
@@ -11,15 +11,21 @@ public class Blah {
public static int Main ()
{
- Blah i = new Blah ();
+ Blah f = new Blah ();
- MyDelegate del = new MyDelegate (i.Foo);
+ MyDelegate del = new MyDelegate (f.Foo);
+
+ MyDelegate another = new MyDelegate (del);
int number = del (2, 3);
- Console.WriteLine ("Delegate invocation returned : " + number);
+ int i = another (4, 6);
+
+ Console.WriteLine ("Delegate invocation of one returned : " + number);
+
+ Console.WriteLine ("Delegate invocation of the other returned : " + i);
- if (number == 5)
+ if (number == 5 && i == 10)
return 0;
else
return 1;