Click here to Skip to main content
15,900,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everybody

I Have here some Code in VB, i am new in C#
so how can i solve that in C#

My code in VB:
VB
Sub Main()

    Dim App As Object
    App = CreateObject("PCDLRN.Application")

    Dim Part As Object
    Part = App.ActivePartProgram

    Dim Cmds As Object
    Cmds = Part.Commands

    Dim PartProg As Object
    PartProg = App.ActivePartProgram

    Part.EXECUTE()

    PartProg.Close()

Thank for your help!

[Added VB tag, added code formatting]
Posted
Updated 3-Jul-10 10:16am
v3

Try this. I hope this works.

Object App = CreateObject("PCDLRN.Application");
Object Part = App.ActivePartProgram;
Object Cmds = Part.Commands;
Object PartProg = App.ActivePartProgram;
Part.EXECUTE();
PartProg.Close();
 
Share this answer
 
Google for "convert vb.net to c#" and you will find conversion tools that will help you.
 
Share this answer
 
There are lots of free converters, few are:
Convert C# to VB.NET [^]
Convert C# to VB.NET2[^]
Code Translation for .NET [^]
Convert VB to C# or C# to VB[^]
Try it yourself!
 
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