⌊ K™¦krizzna.web.id ⌉

Sekedar coretan seorang nyubi

Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)

Posted on

Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)

using System;

namespace evnt

{

delegate void del();

class evnt

{

static void Main()

{

evnt1 n = new evnt1();

n.show1();

evnt a = new evnt();

            n.evnt2 += new del(a.show2);

n.evnt2 += new del(n.show1);

            n.show();  

Console.ReadLine();

}

public void show2()

{

Console.WriteLine(“Event Fired”);

}

}

class evnt1

{

public event del evnt2;

public void show()

{

Console.WriteLine(“Are you there again”);

if(evnt2 != null)

{

evnt2();

}

Console.WriteLine(“HELLO”);

}

public void show1()

{

Console.WriteLine(“Are you there “);

}

}

}

Written by xxris

Share and Enjoy:
  • printfriendly Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)
  • digg Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)
  • delicious Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)
  • facebook Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)
  • yahoobuzz Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)
  • twitter Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)
  • googlebookmark Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)
  • email link Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)
  • linkedin Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)
  • live Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)
  • myspace Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)
  • pdf Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)
  • plurk Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)
  • slashdot Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)
  • technorati Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)
  • tumblr Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)
  • hackernews Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)

Tags: , , , , ,