Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 21st, 2008, 11:37 AM
Authorized User
 
Join Date: Jul 2008
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default How To convert code

Hey all
I wanna know how to convert the VB code into C# code
Thank you

aliusmankhan
__________________
aliusmankhan
Reply With Quote
  #2 (permalink)  
Old July 21st, 2008, 12:56 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Line by line, take the actions that the VB makes happen, and create the same functionality in C#.

You can speed some of this by writing some rules in a Word macro, pasting the VB into Word, and running the macro against the "document."

For instance, you could turn all "End Sub" and "End Function" statements into "}"

You could look for specific signatures in the the procedure declaration, and replace them with C# equivalents. When you find ") As Integer" at the end of a line, add "int " to a string you are creating. If you find "Public Sub ", start with "void "

But as you can see, you essentially would have to "educate" Word about VB syntax and C# syntax.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me i must convert Code vb to C# pla_2 C# 3 October 14th, 2006 12:54 AM
Convert to C# Code sanjaymannnet ASP.NET 1.0 and 1.1 Basics 1 September 16th, 2006 10:47 AM
Convert C++ Code to C# skin C# 2 May 30th, 2006 05:34 AM
Convert VB to C# code skdp VS.NET 2002/2003 2 March 1st, 2004 11:45 PM



All times are GMT -4. The time now is 06:14 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.