Newby question about voids

  • Thread starter Thread starter Blaz Ziherl
  • Start date Start date
B

Blaz Ziherl

Hi,

I have the following problem: I have an event in the class called
'HtmlEditor'. This class is then used in another class (called
'HandleWndProc') like this:

class HandleWndProc: NativeWindow
{
internal HtmlEditor thecontrol;
...
}

In the 'HandleWndProc' class I also have a void that raises that
'HtmlEditor thecontrol' event, like this:

void RaiseEvent()
{
thecontrol.InvokeOnDoubleClick();
}

How can I call this void from a third class?

Best Regards,
Blaz Ziherl
(e-mail address removed)
 
You would have to change the access from private (default) to public
public void RaiseEvent()
{
}
 
TomB already answered your question, so I don't need to, but I just thought I'd point out that your use of the terms 'void' and 'voids' are a bit off the mark. The 'void' keyword simply means that the method does not return a value

It makes no more sense to call

private void DoSomething(

......


a void than to call this block of code

private TcpListener GetListener(

......


a TcpListener. It's simply the Type of the return value
 
Back
Top