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!

Signature
(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
Anthony Jones - 13 Sep 2007 16:12 GMT
> 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??

Signature
Anthony Jones - MVP ASP/ASP.NET
WebBuilder451 - 13 Sep 2007 20:36 GMT
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.

Signature
(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
> > I have a site wher ei'm using both cs and vb helper classes and it's
> working
[quoted text clipped - 7 lines]
>
> BTW, despite you're preamble, why??
Siva M - 13 Sep 2007 16:14 GMT
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?
> 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;
[quoted text clipped - 4 lines]
>
> Thanks!
Peter Bromberg [C# MVP] - 13 Sep 2007 18:46 GMT
If you really like c#, then simply consider translating the Vb.NET class to
c# and be done with it.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
> 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;
[quoted text clipped - 4 lines]
>
> Thanks!
WebBuilder451 - 13 Sep 2007 20:38 GMT
yes i thought of that, believe it or not, will not help the other developers
working on the project, and it'd be work.

Signature
(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
> If you really like c#, then simply consider translating the Vb.NET class to
> c# and be done with it.
[quoted text clipped - 12 lines]
> >
> > Thanks!