Click here to Skip to main content
15,904,024 members
Home / Discussions / C#
   

C#

 
GeneralRe: Simple File Counting Pin
Giorgi Dalakishvili19-Dec-07 8:24
mentorGiorgi Dalakishvili19-Dec-07 8:24 
GeneralRe: Simple File Counting Pin
Jimmanuel19-Dec-07 8:24
Jimmanuel19-Dec-07 8:24 
GeneralRe: Simple File Counting Pin
ffowler19-Dec-07 8:26
ffowler19-Dec-07 8:26 
GeneralListView Pin
half-life19-Dec-07 7:30
half-life19-Dec-07 7:30 
GeneralRe: ListView Pin
mav.northwind19-Dec-07 9:13
mav.northwind19-Dec-07 9:13 
NewsSwitching internet connections Pin
new2pgrmg19-Dec-07 6:54
new2pgrmg19-Dec-07 6:54 
GeneralWebPart only renders ok calling CreateChildControl manually Pin
harleydk19-Dec-07 6:33
harleydk19-Dec-07 6:33 
GeneralIs I can fire events using delegated method using "events and delegates" Pin
nallanch_srinivas19-Dec-07 6:24
nallanch_srinivas19-Dec-07 6:24 
Hi All,



I have created a delegate and called method in one process. And I am trying to fire event corresponding to this delegate. Programm was running without errors and exceptions. But event handing method was not firing.



could you please suggest me what I made wrong.



Thanks for great support and knowledge sharing.

--------------------------------------------------------------------------------

I have created a form with one delegate:

namespace DelegateDefenitionContainedApplication

{

public delegate void HiSrinivas(object sender, EventArgs e);

public partial class Form1 : Form

{

public static void button1_Click(object sender, EventArgs e)

{

MessageBox.Show("You are succeeded");

}

}

}



And I have created one console application using following way:

namespace EventCaller

{

class myEventClass

{

public static event DelegateDefenitionContainedApplication.HiSrinivas ClickMe;

public void abc()

{

ClickMe += new DelegateDefenitionContainedApplication.HiSrinivas(DelegateDefenitionContainedApplication.Form1.button1_Click);

}

}

class Program

{


static void Main(string[] args)

{

try

{

myEventClass mySrinivas = new myEventClass();

mySrinivas.abc();



}

}

}

}
GeneralRe: Is I can fire events using delegated method using "events and delegates" Pin
Nathan Holt at EMOM19-Dec-07 11:47
Nathan Holt at EMOM19-Dec-07 11:47 
Generalbuild a C# project in Release & Debug (same out put directory) Pin
kaminem19-Dec-07 5:30
kaminem19-Dec-07 5:30 
GeneralRe: build a C# project in Release & Debug (same out put directory) Pin
darkelv19-Dec-07 6:11
darkelv19-Dec-07 6:11 
Generalhyperlink on a desktop app. Pin
s3rro19-Dec-07 5:02
s3rro19-Dec-07 5:02 
GeneralRe: hyperlink on a desktop app. Pin
DaveyM6919-Dec-07 5:23
professionalDaveyM6919-Dec-07 5:23 
GeneralRe: hyperlink on a desktop app. Pin
Anthony Mushrow19-Dec-07 7:31
professionalAnthony Mushrow19-Dec-07 7:31 
GeneralHandling keystrokes Pin
jesarg19-Dec-07 4:44
jesarg19-Dec-07 4:44 
GeneralRe: Handling keystrokes Pin
Luc Pattyn19-Dec-07 5:15
sitebuilderLuc Pattyn19-Dec-07 5:15 
GeneralRe: Handling keystrokes Pin
jesarg19-Dec-07 10:12
jesarg19-Dec-07 10:12 
GeneralPropertyGrid Pin
netJP12L19-Dec-07 4:27
netJP12L19-Dec-07 4:27 
GeneralRe: PropertyGrid Pin
TJoe19-Dec-07 5:30
TJoe19-Dec-07 5:30 
GeneralRe: PropertyGrid Pin
netJP12L19-Dec-07 5:37
netJP12L19-Dec-07 5:37 
AnswerRe: PropertyGrid Pin
TJoe19-Dec-07 6:05
TJoe19-Dec-07 6:05 
GeneralRe: PropertyGrid Pin
netJP12L19-Dec-07 6:58
netJP12L19-Dec-07 6:58 
AnswerRe: PropertyGrid Pin
TJoe20-Dec-07 3:00
TJoe20-Dec-07 3:00 
GeneralRe: PropertyGrid Pin
netJP12L20-Dec-07 5:26
netJP12L20-Dec-07 5:26 
GeneralRe: PropertyGrid Pin
TJoe20-Dec-07 5:59
TJoe20-Dec-07 5:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.