Equivalent in VB.NET ?

M

MobileBoy36

Hello group,

What is the equivalent of this code snippet in C#?

public event EventHandler OnConnect
{
add { lock(syncRoot) { connectedEvent += value; } }
remove { lock(syncRoot) { connectedEvent -= value; } }
}

best regards,
Mobile Boy
 
M

MobileBoy36

Thanks for your response Daniel...

Do you already now how to achieve the += in VB.NET on the line
connectedEvent += value?

best regards
 

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

Similar Threads

generics question 1
Pessimistic locking 4
2.0 question, SyncRoot in generic collections? 2
Thread safety ?? 10
2.0 Collections data 5
Threads fundamental question 3
Generic Singleton? 7
[In,Out] equivalent 2

Top