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>
1
  • 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 Commented Sep 3, 2019 at 23:35

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.