Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

From C# to VB

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Arne Garvander - 09 Jul 2007 17:10 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?
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.