You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
647 B
26 lines
647 B
namespace DelegateEventFuncAction
|
|
{
|
|
internal class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
//DelegateTest.DoTest1();
|
|
//DelegateTest.DoTest2();
|
|
|
|
EventTest et = new EventTest();
|
|
et.Trigger += (message) =>
|
|
{
|
|
Console.WriteLine($"[Delegate] {message}");
|
|
};
|
|
et.TriggerByAction += (message) =>
|
|
{
|
|
Console.WriteLine($"[Action] {message}");
|
|
};
|
|
et.Notify();
|
|
et.Notify();
|
|
et.Notify();
|
|
et.Notify();
|
|
et.Notify();
|
|
}
|
|
}
|
|
} |