0

Hi I have a webservice project using C# project. Currently I have a vb file that I want to use. I put it on a folder name ,VBCode, inside the App_Code. I also follow the Using C# and VB.NET classes together in the App_Code folder. I added the namespace and modified the webconfig. However when I complied it that I got a lot of error such as ";expecting". Is it possible to have vb file in C# project.

 <codeSubDirectories>       
    <add directoryName="VBCode"/>
  </codeSubDirectories>
Y Chan
  • 317
  • 2
  • 18
  • 7
    the easiest way to mix C# and VB is through class libraries. Simply make a VB class library and put your VB code in that. Your C# class can then reference that lib – Keith Nicholas Sep 03 '19 at 23:35

1 Answers1

0

In theory, the answer is yes and you are doing the configuration in the right way. however this an old tricky code. I suggested migrating the code to C#.

Anyway, you can find more information on these answers associated with the same question here in Stackoverflow.

Mixing C# & VB In The Same Project

Mteheran
  • 265
  • 1
  • 4
  • 8