473,396 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

mixed cs and vb classes

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
Sep 12 '07 #1
2 1331
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]
- mv*@spam.guard.caspershouse.com

"WebBuilder451" <We***********@discussions.microsoft.comwrote in message
news:3F**********************************@microsof t.com...
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

Sep 12 '07 #2
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 [.NET/C# MVP]" wrote:
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]
- mv*@spam.guard.caspershouse.com

"WebBuilder451" <We***********@discussions.microsoft.comwrote in message
news:3F**********************************@microsof t.com...
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


Sep 12 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Bill Cohagan | last post by:
I'm trying to generate class definitions from an XSD that contains something like: <xs:complexType name="foo" mixed="true"> <xs:choice minOccurs = "0" maxOccurs="unbounded"> <xs:element name =...
8
by: Ted Miller | last post by:
Hi folks, I'm looking at moving a large base of C++ code to .Net under tight time constraints. The code runs in mission-critical environments, and I am extremely concerned about the loader lock...
9
by: Edward Diener | last post by:
I received no answers about this the first time I posted, so I will try again. My inability to decipher an MSDN topic may find others who have the same inability and someone who can decipher and...
7
by: Staale L. Hansen | last post by:
We have an application which uses some mixed-mode code to expose a .NET 1.1 managed API. Only the necessary files are compiled with /clr. We want to be able to load the application without .NET...
0
by: Nadav | last post by:
Hi, Introduction ***************** I am writing a mixed mode assembly, this assembly is used to expose performance critical functionality implemented through an unmanaged .lib file to the...
0
by: bonk | last post by:
I have a plain unmanaged exe (no /CLR) that is supposed to to use classes from a mixed mode dll (dll that uses .NET internally). That dll only needs to expose unmanaged interfaces (classes and/or...
5
by: bonk | last post by:
I have a plain unmanaged exe (no /CLR) that is supposed to to use classes from a mixed mode dll (dll that uses .NET internally). That dll only needs to expose unmanaged interfaces (classes and/or...
2
by: bearophileHUGS | last post by:
Notes: - This email is about Mark Dufour's Shed Skin (SS) (http://shed-skin.blogspot.com), but the errors/ingenuousness it contains are mine. My experience with C++ is limited still. - The...
1
by: Colin Desmond | last post by:
I have a dll assembly compiler with the /clr flag as it contains ref classes and traditional style C++ classes. I want to write unit tests for the ref classes in that assembly. VS2005 allows me...
6
by: AG | last post by:
I am working on a web app using both C# and VB. Yes, there is a reason for it. All the code behind is C#. In the web.config I have the following <compilation debug="true">...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.