Home All Groups Group Topic Archive Search About

Converting c# to vb.net

Author
28 Feb 2006 6:58 PM
Venkatachalam
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
   }
}

Author
28 Feb 2006 10:11 PM
Herfried K. Wagner [MVP]
"Venkatachalam" <Venkatacha***@discussions.microsoft.com> schrieb:
> 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 S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
1 Mar 2006 4:07 AM
Michael D. Ober
Private sub SomeMethod()
  if not me.ReceiveData is Nothing then

    ' do something
  end if
end sub

Mike.

Show quoteHide quote
"Venkatachalam" <Venkatacha***@discussions.microsoft.com> wrote in message
news:9EF05A6A-FB7E-41C4-B6EE-CCAB443C272E@microsoft.com...
> 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
>    }
> }
>
Author
1 Mar 2006 5:10 AM
Venkatachalam
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.


Show quoteHide quote
"Michael D. Ober" wrote:

> Private sub SomeMethod()
>   if not me.ReceiveData is Nothing then
>
>     ' do something
>   end if
> end sub
>
> Mike.
>
> "Venkatachalam" <Venkatacha***@discussions.microsoft.com> wrote in message
> news:9EF05A6A-FB7E-41C4-B6EE-CCAB443C272E@microsoft.com...
> > 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
> >    }
> > }
> >
>
>
>
>
Author
1 Mar 2006 12:39 PM
Herfried K. Wagner [MVP]
"Venkatachalam" <Venkatacha***@discussions.microsoft.com> schrieb:
> 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.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>