Recently, I’ve been involved in a .NET project that uses both VB.NET and C# projects in the same Visual Studio solution. Personally, I prefer C#, but VB.NET isn’t that hard to switch to, except that you can run into an unlogical namespace inconvenience.
VB.NET and C# handle the namespace inheritence in their class files and project files differently :S
- Specify the Root namespace of your project as “Test.VB”
- Add the following class to that project:
Public Class Class1
- Specify the Root namespace of your project as “Test.CS”
- Add the following class to your project:
public class Class1
Addressing those classes from your main project in the solution:
As you can see… The VB.NET class inherits the project’s namespace, the C# class doesn’t.