Converting c# to vb.net

G

Guest

Hello,

Can any one of you help to convert this code in vb.net. I dont know vb.net...

Thanks in advance

With regards
venkat

public event ReceiveDataDelegate ReceiveData;
public delegate void ReceiveDataDelegate(object sender, ReceiveDataEventArgs
e);

private void somemethod()
{
if (this.ReceiveData != null )
{
//do something
}
}
 
H

Herfried K. Wagner [MVP]

Venkatachalam said:
Can any one of you help to convert this code in vb.net. I dont know
vb.net...

This article contains a list of available C# to VB.NET translators:

Converting code between .NET programming languages
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=languageconverters&lang=en>

The converter of Tangible Software Solutions Inc. produces very accurate
results. You may want to order a demo version:

<URL:http://www.tangiblesoftwaresolutions.com/Demo_Download/Instant_VB/Request_Demo_Instant_VB.htm>
 
M

Michael D. Ober

Private sub SomeMethod()
if not me.ReceiveData is Nothing then

' do something
end if
end sub

Mike.
 
G

Guest

equivalent error for that syntax...

c:\inetpub\wwwroot\PaypalSample\PayPalUtils\wwHTTP.vb(604): 'Public Event
ReceiveData(sender As Object, e As ReceiveDataEventArgs)' is an event, and
cannot be called directly. Use a 'RaiseEvent' statement to raise an event.
 
H

Herfried K. Wagner [MVP]

Venkatachalam said:
equivalent error for that syntax...

c:\inetpub\wwwroot\PaypalSample\PayPalUtils\wwHTTP.vb(604): 'Public Event
ReceiveData(sender As Object, e As ReceiveDataEventArgs)' is an event, and
cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

What exactly do you want to archieve? You could use 'RaiseEvent' if you
want to raise the event.
 

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