I need to translate this code snippet to VB.
void Page_Init(object sender, EventArgs e)
{
Page.InitComplete += new EventHandler(InitializationComplete);
}
How do I do that?

Signature
Arne Garvander
(I program VB.Net for fun and C# to get paid.)
Mark Rae [MVP] - 09 Jul 2007 17:23 GMT
>I need to translate this code snippet to VB.
> void Page_Init(object sender, EventArgs e)
> {
> Page.InitComplete += new EventHandler(InitializationComplete);
> }
> How do I do that?
How about this...?
Private Sub Page_Init(ByVal sender As Object, ByVal e As EventArgs)
AddHandler Page.InitComplete, AddressOf InitializationComplete
End Sub
I should point out that I haven't actually tried this - I never go anywhere
near VB.NET - I just dropped the C# into a few online converters and that's
what they come out with...

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
SteveT - 09 Jul 2007 17:27 GMT
On Jul 9, 12:10 pm, Arne Garvander
<ArneGarvan...@discussions.microsoft.com> wrote:
> I need to translate this code snippet to VB.
> void Page_Init(object sender, EventArgs e)
[quoted text clipped - 5 lines]
> Arne Garvander
> (I program VB.Net for fun and C# to get paid.)
Get a copy of SharpDeveloper from
http://sourceforge.net/project/downloading.php?groupname=sharpdevelop&filename=S
harpDevelop_2.2.0.2595.msi&use_mirror=superb-west
You can use it to translate C# to VB and vice versa. It is real handy
for translating snips, pages or whole projects.
Steve T.
Alex Meleta - 09 Jul 2007 17:39 GMT
Hi Arne,
One of the code online converters (which are mentioned by Mark):
[Snippet Converter Converts code snippets C# to VB.NET and vice versa]
http://codeconverter.sharpdevelop.net/SnippetConverter.aspx
Regards, Alex Meleta
[TechBlog] http://devkids.blogspot.com
AG> I need to translate this code snippet to VB.
AG> void Page_Init(object sender, EventArgs e)
AG> {
AG> Page.InitComplete += new
AG> EventHandler(InitializationComplete);
AG> }
AG> How do I do that?
Alvin Bruney [MVP] - 11 Jul 2007 03:22 GMT
or instant c# (instant vb) the demo version allows you to convert 100 lines
of code

Signature
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
https://www.microsoft.com/MSPress/books/10933.aspx
OWC Black Book www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
> Hi Arne,
>
[quoted text clipped - 11 lines]
> AG> }
> AG> How do I do that?
Alexey Smirnov - 11 Jul 2007 08:40 GMT
On Jul 11, 4:22 am, "Alvin Bruney [MVP]" <some guy without an email
address> wrote:
> or instant c# (instant vb) the demo version allows you to convert 100 lines
> of code
[quoted text clipped - 6 lines]
> OWC Black Bookwww.lulu.com/owc
> Professional VSTO 2005 - Wrox/Wiley
http://www.developerfusion.co.uk/utilities/convertcsharptovb.aspx