mixed cs/vb question

G

Guest

I have a site wher ei'm using both cs and vb helper classes and it's working
ok (please the, "why would you want to do that" comment is unnecessay;
"stuff" happens and you need to play the hand you are delt).

However, i need to access some methods in a cs class from a vb class. Does
anyone know how to do this?

Thanks!
--
(i''ll be asking a lot of these, but I find C# totally way cooler than vb
and there''s no go''n back!!!)
thanks (as always)

kes
 
A

Anthony Jones

WebBuilder451 said:
I have a site wher ei'm using both cs and vb helper classes and it's working
ok (please the, "why would you want to do that" comment is unnecessay;
"stuff" happens and you need to play the hand you are delt).

However, i need to access some methods in a cs class from a vb class. Does
anyone know how to do this?

Have you tried adding the microsoft.visualbasic.dll to a C# project?

BTW, despite you're preamble, why??
 
G

Guest

Assuming you have both C# and VB code in their own projects (in a solution,
likely):

1. Make the CS class and method both public
2. Add a project reference to the CS project from VB.NET project

And you all set to instantiate/access the C# class/method...

Hope this helps?
 
G

Guest

actually i did that when i was learning cs because i got frustrated one day.
they are both in the same project and working ok i can instate a cs class in
a vb or cs page.
as to why? i didn't want ot rewrite 20 or 30 functions for simple CRUD
operations.

--
(i''ll be asking a lot of these, but I find C# totally way cooler than vb
and there''s no go''n back!!!)
thanks (as always)

kes
 
G

Guest

yes i thought of that, believe it or not, will not help the other developers
working on the project, and it'd be work.
--
(i''ll be asking a lot of these, but I find C# totally way cooler than vb
and there''s no go''n back!!!)
thanks (as always)

kes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,060
Latest member
BuyKetozenseACV

Latest Threads

Top