Click here to Skip to main content
16,021,169 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Please help me to convert this code to c#

How to convert IP address to country name[^]


I tried to convert at the site of
Convertion Tool from VB To C#[^]

But I failed
Posted
Updated 13-Jan-10 0:27am
v2

No-one is going to write a full conversion for you. If you need it for work, you can buy converters that work better than the free ones. Either way, converting between VB and C# is easy, only some basic syntax changes. Take what you've got from the online converter, and figure out what bits are not right, then work out how to convert them. You could ask more specific questions here, but asking us to convert it for you, is not likely to work out.
 
Share this answer
 
The best way to convert is to use Reflector[^]

Just compile the code into an assembly and just place the assembly in the Reflector.

It converts everything perfectly to original source code (VB,C#, C++, Delphi etc).

;)
 
Share this answer
 
I've used this online converter[^], but it's pretty bad at converting. Most of the other online ones are just as bad (as Christian has already noted.

If you google "VB.Net to C# converter", you'll get quite a few hits on commercial products. Keep in mind that none of them will be able to do a complete conversion on more complex projects, so you're still going to have to be a programmer, and do some of it yourself.
 
Share this answer
 
v2
You can also use
http://www.aspxcode.net/free-asp-net-sample-source-code.aspx?Topics=How%20to%20get%20IP%20Address%20of%20Visitor's%20Machine[^]

To do the same thing.. And it is in VB.NET so you dont need to convert it. ;)
 
Share this answer
 
 
Share this answer
 
I have used this link many times to convert vb to c#. URL is

http://www.developerfusion.com/tools/convert/vb-to-csharp/[^].

Hope it will work for you.

Thanks
Mehul Thakkar
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900