Can you mix vb net and c




















Then as you convert each page, include both published. This may have been the case in older. The only distinction I have is the vb code runs in a separate folder but it is still part of hte same solution and project. The original question was how to incorporate both languages in a single project not a solution.

Is this something new to Visual Studio ? Same goes for C. My projects are running as. Each solution has 1 project and I'm able to add both. You may need to add c to your web. The content you requested has been removed. Ask a question. Quick access. Search related threads. NET Web Projects. Developers commonly include multiple programming languages in Web applications to support multiple development teams that operate independently and prefer different programming languages.

You can have both in the same solution as long as you are running Visual Studio Professional and above , so the easiest solution if you want to keep using Visual Studio is to seperate your VB code into a different project and access it that way.

Why don't you just compile your VB code into a library. Reference it later from your code and that's it. Managed dlls contain MSIL to which both c and vb are compiled.

Right-click the Project. Choose Add Asp. Net Folder. Config add a new element under compilation. Where MyClassName is an class object found in the namespace above.

Net project. I don't see how you can compile a project with the C compiler or the VB compiler and not have it balk at the wrong language for the compiler. Keep your C code in a separate project from your VB project. You can include these projects into the same solution. You need one project per language. I'm quite confident I saw a tool that merged assemblies, if you find that tool you should be good to go.

If you need to use both languages in the same class, you should be able to write half of it in say VB. It DOES compile both in the same project if you create sub directories of in app code with the related language code.

As of yet, I am looking for whether this should work in 3. As others have said, you can't put both in one project. However, if you just have a small piece of C or VB code that you want to include in a project in the other language, there are automatic conversion tools. They're not perfect, but they do most things pretty well. Also, SharpDevelop has a conversion utility built in.

No, not in the same project. For example VB does not understand unsigned ints. In our scenario, its a single VB. NET project Windows Desktop application in a single solution. Of course we had to work on delinking, unloading, reloading, naming etc of the dynamic DLLs and the memory management were we largely used dynamic GUID for naming to avoid conflict. Yes, You can add both of the file in web site only. If the project is a web application it will not allow different type of file.

Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 12 years, 3 months ago. Active 6 months ago. Viewed k times. Improve this question. Wes P Wes P 9, 14 14 gold badges 40 40 silver badges 48 48 bronze badges. Why are you writing new code in VB if you just finished converting to C? Incidentally, I thought it might be possible to pull off a hybrid approach using partial classes in two different projects, but partials can't span assemblies, so this won't work, either.

That way instead of writing 'from element in root. I have seen your debate and I just did a test:I have a website that has all the pages written in vb. Edd interesting experiment. A different situation than what is being discussed in this question, which is building a class library. But still very interesting. There are some Visual Basic namespaces but those only give you access to the types that are defined in this namespace which may pertain normally to use in VB coding.

These are the guidelines for how code should be written so that it can be used by all. Net languages. For example in C method naming is case sensative, so you can have "public void foo" and "public void Foo" whereas in VB.

Net you cannot. In this case if you expose these two methods then your class is not CLS compliant. If you create an assembly i.



0コメント

  • 1000 / 1000