• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

convert vb6 business objects to c#

Hi

is it possible to convert vb6 code to c# as there some features in c#  which I want to use and obviously don't exist in vb6.

Let me explain further:

I want to create a wizard which either gives the user the option of running specific stored procedures for one program that does not have business objects, or to fire information at  a program that has vb6 business objects, or to fire information at a program that has  c# business objects.

Could I achieve this in c#?
0
JakeyCakes
Asked:
JakeyCakes
  • 4
  • 3
1 Solution
 
Carl TawnSystems and Integration DeveloperCommented:
You would have to manually recode it in C#, but it should certainly be possible. Obviously some of the constructs will be different because C# is fully OO and VB6 isn't.

If your VB6 business objects are DLLs then you should be able to reference them in your C# code if you need to.
0
 
JakeyCakesAuthor Commented:
carl,

Its all the business objects are stored in one DLL. How could I reference the dill in my c# code?
0
 
Carl TawnSystems and Integration DeveloperCommented:
In the project just go to Project > Add Reference. Then your VB6 DLL should appear under the COM tab. If it doesn't, go to the Browse tab and add it manually.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
JakeyCakesAuthor Commented:
Ok referenced. how can I use the dll now in code

e.g. To add a company.
0
 
Carl TawnSystems and Integration DeveloperCommented:
You should just be able to reference the classes as you would any other type:

    ProjectName.ClassName obj = new ProjectName.ClassName();
0
 
JakeyCakesAuthor Commented:
carl,

I get  told that certain classes are iinaccessible due to its protection level. What is meant by that?
0
 
Carl TawnSystems and Integration DeveloperCommented:
It means that they are flagged as private or some other non-public setting. In terms of VB classes you will need to look at the Instancing property for your class.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now