Skip to content
WJunction - Webmaster Forum

C# public void ... help

Status
Not open for further replies.
i just cant find a way to call a void fun on events like connection lost or creation...
public void checkiftherisconnection()
{
Monitor the sock IO
}
private void Form1_Load(object sender, EventArgs e)
{

}

I hope you get me ...

Thanks
 
Last edited:

1 comment

if its part of the same object / class then just use:

Code:
this.checkiftherisconnection();

but with your naming of the method it seems you want to return a bool rather than void.

Code:
public bool checkiftherisconnection()
{
    return this.is_connected;
}

then in your event method use the above this.checkiftherisconnection() within an if statement,
 
Status
Not open for further replies.

About the author

C
Active Member · Joined
566
Messages
9
Reactions
18
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom