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#?
JakeyCakesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.