T
Tom Kelleher
Question: Can namespaces be shared by several projects within a
solution, if those projects use different languages?
We wrote some db code in C#, and some biz logic in VB.NET. We brought
both projects within the same solution. We used identical namespace
commands for both: "Level1.Level2.Level3" Both the C# and VB.NET
classes live off "Level3."
In other VB classes, I can do this...
"Dim x as Level1.Level2.Level3.myVBClass"
In other C# classes we can do this...
"Level1.Level2.Level3.myCSClass x"
But from VB.NET we can't do this...
"Dim x as Level1.Level2.Level3.myCSClass"
If I change the namespace path slightly for C#, like making it
"LevelXXX.Level2.Level3" -- then suddenly I can see it from VB.NET.
It tells me we can't share namespaces, which seems really really weird.
Why have a programming system where (1) you can use multiple languages,
yay! - and (2) you can use namespaces to provide clean structure, yay!
-- but you can't do both at the same time?
- Tom
solution, if those projects use different languages?
We wrote some db code in C#, and some biz logic in VB.NET. We brought
both projects within the same solution. We used identical namespace
commands for both: "Level1.Level2.Level3" Both the C# and VB.NET
classes live off "Level3."
In other VB classes, I can do this...
"Dim x as Level1.Level2.Level3.myVBClass"
In other C# classes we can do this...
"Level1.Level2.Level3.myCSClass x"
But from VB.NET we can't do this...
"Dim x as Level1.Level2.Level3.myCSClass"
If I change the namespace path slightly for C#, like making it
"LevelXXX.Level2.Level3" -- then suddenly I can see it from VB.NET.
It tells me we can't share namespaces, which seems really really weird.
Why have a programming system where (1) you can use multiple languages,
yay! - and (2) you can use namespaces to provide clean structure, yay!
-- but you can't do both at the same time?
- Tom