Click here to Skip to main content
11,640,445 members (61,145 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#3.0 VB6 .NET VB.NET
I have the following code which needs to be converted to c# .net .


dim server
set server = CreateObject("DSServerMap.Server")


dim root
set root = server.CreateObject("Server")


the first statement converted was as
DSServerMap.Server server = new DSServerMap.Server();

i Dont if the code is in vb6 or vb.net

but i cant seem to convert the 2 nd line to c#
I using the dll which has all the functionalities

can anyone help me with this . Thank u
Posted 25-Sep-12 0:01am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

try this
object server = null;
server = Interaction.CreateObject("DSServerMap.Server");
object root = null;
root = server.CreateObject("Server");


Some of vb-c# converters
http://www.carlosag.net/tools/codetranslator/[^]
http://converter.telerik.com/[^]
  Permalink  
Comments
gaurish thakkar at 25-Sep-12 6:21am
   
Thank u very much
Santhosh Kumar J at 25-Sep-12 6:24am
   
welcome
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi,
use following link to convert your code from C# to Vb and From Vb to C#

http://converter.telerik.com/[^]
  Permalink  
Comments
gaurish thakkar at 25-Sep-12 6:12am
   
I am getting error at line1 col1
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi,

Please see the below link. It might be help you.

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

Thanks,
Viprat
  Permalink  

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

  Print Answers RSS
0 Mika Wendelius 240
1 CPallini 209
2 OriginalGriff 165
3 Sergey Alexandrovich Kryukov 139
4 F-ES Sitecore 120
0 Mika Wendelius 200
1 OriginalGriff 145
2 CPallini 115
3 jgakenhe 40
4 sasanka sekhar panda 30


Advertise | Privacy | Mobile
Web01 | 2.8.150731.1 | Last Updated 25 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100