Click here to Skip to main content
15,881,819 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have the following code which needs to be converted to c# .net .


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



VB
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

try this
C#
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/[^]
 
Share this answer
 
Comments
gaurish thakkar 25-Sep-12 6:21am    
Thank u very much
Santhosh Kumar Jayaraman 25-Sep-12 6:24am    
welcome
Hi,
use following link to convert your code from C# to Vb and From Vb to C#

http://converter.telerik.com/[^]
 
Share this answer
 
Comments
gaurish thakkar 25-Sep-12 6:12am    
I am getting error at line1 col1
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
 
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