mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-20 12:58:39 +00:00
25 lines
No EOL
553 B
C#
25 lines
No EOL
553 B
C#
using System;
|
|
|
|
namespace IL2CPU.Tests.Tests.Events.CustomDelegate {
|
|
public delegate void OurDelegateTest(int aValue);
|
|
public static class CustomDelegate {
|
|
private static int ReturnCode;
|
|
private static void Handler(int aValue) {
|
|
ReturnCode -= aValue;
|
|
}
|
|
|
|
private static void Handler2(int aValue) {
|
|
ReturnCode -= (aValue * 2);
|
|
}
|
|
|
|
private static OurDelegateTest mHandler;
|
|
|
|
static int Main() {
|
|
ReturnCode = 15;
|
|
mHandler += Handler;
|
|
mHandler += Handler2;
|
|
mHandler(5);
|
|
return ReturnCode;
|
|
}
|
|
}
|
|
} |