mixed cs and vb classes

G

Guest

Ok this is for other who like me just can't get enough of complications!
i have two app_code directories one for cs and one for vb
it works ok, but now i need to reference a cs class from a vb class.
How is this done?

Thanks
(and yes it would be nice if cs were the one and only language here.)
--
(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
 
N

Nicholas Paldino [.NET/C# MVP]

kes,

For an ASP.NET application, I don't think you are able to do that, as
all the code is compiled into one assembly.

Your options are to compile the classes used in one language into a
separate dll and then reference that from your ASP.NET application.

I am curious, why do you have a need to use VB in some code files, and
C# in others? Why not one language?
 
G

Guest

Thanks for replying.
i'm mixing them now and it does work you just need to add a
<compilation debug="false">
<codeSubDirectories>
<add directoryName="VB"/>
<add directoryName="CS"/>
</codeSubDirectories>
.......
......
</compilation>
and then keep the vb classes in one and the cs in the other
I and referencing the vb classes in cs pages and cs classes in vb pages
probelem is i'd like to reference a cs class in a vb class.

as to why? well, i just love compication. No, I already had the cs classes,
a lot of them including 20+ datareaders and updaters that work perfectly and
did not want to re-write in vb. The vb site is an older one being upgraded
--- i did not say re-written!

--
(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


Nicholas Paldino said:
kes,

For an ASP.NET application, I don't think you are able to do that, as
all the code is compiled into one assembly.

Your options are to compile the classes used in one language into a
separate dll and then reference that from your ASP.NET application.

I am curious, why do you have a need to use VB in some code files, and
C# in others? Why not one language?


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

WebBuilder451 said:
Ok this is for other who like me just can't get enough of complications!
i have two app_code directories one for cs and one for vb
it works ok, but now i need to reference a cs class from a vb class.
How is this done?

Thanks
(and yes it would be nice if cs were the one and only language here.)
--
(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

Top