Newby question about voids

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)
 
T

TomB

You would have to change the access from private (default) to public
public void RaiseEvent()
{
}
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top