Click here to Skip to main content
15,912,578 members
Home / Discussions / C#
   

C#

 
GeneralLog URL's visited Pin
Stuggo17-Jun-04 1:00
Stuggo17-Jun-04 1:00 
GeneralRe: Log URL's visited Pin
Heath Stewart17-Jun-04 1:39
protectorHeath Stewart17-Jun-04 1:39 
GeneralEvents Pin
bouli17-Jun-04 1:00
bouli17-Jun-04 1:00 
GeneralRe: Events Pin
Heath Stewart17-Jun-04 1:34
protectorHeath Stewart17-Jun-04 1:34 
GeneralRe: Events Pin
Corinna John17-Jun-04 1:47
Corinna John17-Jun-04 1:47 
GeneralRe: Events Pin
Heath Stewart17-Jun-04 1:50
protectorHeath Stewart17-Jun-04 1:50 
GeneralRe: Events Pin
bouli17-Jun-04 1:56
bouli17-Jun-04 1:56 
GeneralRe: Events Pin
bouli17-Jun-04 1:48
bouli17-Jun-04 1:48 
Hi Heath,

I was looking that way... Delegates. it seems they look like callbacks.
I can declare my delegate, but I don't understand yet how to use it in my class.

I have done the following:
<br />
class PeerPlayer<br />
{<br />
  ...<br />
  public delegate void HostFound(HostInfo node);<br />
<br />
  public void FindHostResponseHandler(object sender, FindHostResponseEventArgs args)<br />
  {<br />
   HostInfo			node=new HostInfo();<br />
			<br />
  node.GuidInstance=args.Message.ApplicationDescription.GuidInstance;<br />
			node.HostAddress=(Address) args.Message.AddressSender.Clone();<br />
			node.SessionName=args.Message.ApplicationDescription.SessionName;<br />
<br />
			if (!m_sessions.Contains(node))<br />
			{<br />
				m_sessions.Add(node);<br />
                               // i need to call the delegate here<br />
			}<br />
		}<br />
  ...<br />
}:((<br />


There is no spoon.
GeneralRe: Events Pin
Heath Stewart17-Jun-04 1:52
protectorHeath Stewart17-Jun-04 1:52 
GeneralRe: Events Pin
bouli17-Jun-04 2:08
bouli17-Jun-04 2:08 
GeneralRe: Events Pin
Heath Stewart17-Jun-04 2:15
protectorHeath Stewart17-Jun-04 2:15 
GeneralRe: Events Pin
bouli17-Jun-04 2:34
bouli17-Jun-04 2:34 
GeneralRe: Events Pin
Corinna John17-Jun-04 1:39
Corinna John17-Jun-04 1:39 
GeneralRe: Events Pin
bouli17-Jun-04 1:45
bouli17-Jun-04 1:45 
GeneralRe: Events Pin
Corinna John17-Jun-04 1:52
Corinna John17-Jun-04 1:52 
GeneralRe: Events Pin
bouli17-Jun-04 1:56
bouli17-Jun-04 1:56 
GeneralRe: Events Pin
bouli17-Jun-04 2:01
bouli17-Jun-04 2:01 
Generalcheck programatically if IIS is installed Pin
michalJ17-Jun-04 0:13
michalJ17-Jun-04 0:13 
GeneralRe: check programatically if IIS is installed Pin
Heath Stewart17-Jun-04 1:27
protectorHeath Stewart17-Jun-04 1:27 
GeneralRe: check programatically if IIS is installed Pin
michalJ17-Jun-04 4:51
michalJ17-Jun-04 4:51 
GeneralInvert grapics in 2D Pin
Mikke_x16-Jun-04 22:30
Mikke_x16-Jun-04 22:30 
GeneralRe: Invert grapics in 2D Pin
Heath Stewart17-Jun-04 1:23
protectorHeath Stewart17-Jun-04 1:23 
GeneralRe: Invert grapics in 2D Pin
Mikke_x17-Jun-04 2:15
Mikke_x17-Jun-04 2:15 
Generalexport dataset to execl 2000 Pin
Wilson Wu16-Jun-04 21:28
Wilson Wu16-Jun-04 21:28 
GeneralRe: export dataset to execl 2000 Pin
Heath Stewart16-Jun-04 21:35
protectorHeath Stewart16-Jun-04 21:35 

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.