Hi,

Im converting some code from C# to VB .NET and it's giving me some trouble.
Below are the snippets. I get the syntax error "End of statement expected"
so I added implements and it gives me '.' expected.

Any ideas?

If ya can help i will give you a free copy of the software :)

Thanks.

C# ------- No Errors

namespace nsTest
{
public delegate void MyDelegate();

public class test
{
public event MyDelegate MyEvent;
}

}


VB .NET ------ Errors

Namespace nsTest
Public Delegate Sub MyDelegate()

Public Class test
Public Event MyEvent MyDelegate '<-- error this way = End of
statement expected
Public Event MyEvent MyDelegate '<-- error this way = '.' expected
End Class

End Namespace

Re: C# to VB .NET Conversion? by William

William
Fri Sep 12 16:16:34 CDT 2003

Public Event MyEvent as MyDelegate

"Coder" <j__i__m1@hotmail.com> wrote in message
news:uz8Ty8WeDHA.988@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> Im converting some code from C# to VB .NET and it's giving me some
trouble.
> Below are the snippets. I get the syntax error "End of statement expected"
> so I added implements and it gives me '.' expected.
>
> Any ideas?
>
> If ya can help i will give you a free copy of the software :)
>
> Thanks.
>
> C# ------- No Errors
>
> namespace nsTest
> {
> public delegate void MyDelegate();
>
> public class test
> {
> public event MyDelegate MyEvent;
> }
>
> }
>
>
> VB .NET ------ Errors
>
> Namespace nsTest
> Public Delegate Sub MyDelegate()
>
> Public Class test
> Public Event MyEvent MyDelegate '<-- error this way = End of
> statement expected
> Public Event MyEvent MyDelegate '<-- error this way = '.'
expected
> End Class
>
> End Namespace
>
>



Re: C# to VB .NET Conversion? by Coder

Coder
Fri Sep 12 16:27:49 CDT 2003

Someone kick me!

Thanks! You win! i will be sure to send you the free software :)

"William Ryan" <dotnetguru@comcast.nospam.net> wrote in message
news:ukCcRLXeDHA.956@TK2MSFTNGP09.phx.gbl...
> Public Event MyEvent as MyDelegate
>
> "Coder" <j__i__m1@hotmail.com> wrote in message
> news:uz8Ty8WeDHA.988@TK2MSFTNGP10.phx.gbl...
> > Hi,
> >
> > Im converting some code from C# to VB .NET and it's giving me some
> trouble.
> > Below are the snippets. I get the syntax error "End of statement
expected"
> > so I added implements and it gives me '.' expected.
> >
> > Any ideas?
> >
> > If ya can help i will give you a free copy of the software :)
> >
> > Thanks.
> >
> > C# ------- No Errors
> >
> > namespace nsTest
> > {
> > public delegate void MyDelegate();
> >
> > public class test
> > {
> > public event MyDelegate MyEvent;
> > }
> >
> > }
> >
> >
> > VB .NET ------ Errors
> >
> > Namespace nsTest
> > Public Delegate Sub MyDelegate()
> >
> > Public Class test
> > Public Event MyEvent MyDelegate '<-- error this way = End of
> > statement expected
> > Public Event MyEvent MyDelegate '<-- error this way = '.'
> expected
> > End Class
> >
> > End Namespace
> >
> >
>
>