locked
Converting fromVB.NET to C# RRS feed

  • Question

  • Hi All,

    i need a dll or somthing to be integrated in my application to convert a given file fron VB.NET code to C# code like , can anyone help?

    Sunday, October 7, 2012 10:08 AM

Answers

  • There's an online C# to Visual Basic and Visual Basic to C# converter at http://converter.telerik.com/ but I don't know anything about using a .dll to do it.

    You've taught me everything I know but not everything you know.

    • Proposed as answer by Mark Liu-lxf Tuesday, October 9, 2012 1:50 AM
    • Marked as answer by Mark Liu-lxf Wednesday, October 17, 2012 5:08 AM
    Sunday, October 7, 2012 10:46 AM
  • Yea but that is typical the C# forum. 

    Here we do conversion from C# to VB 

    http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral

    Be aware however, you can always reference a Class Library written in VB in C# (vise verse can have some problems because C# is not 100% CLI compliant like VB.)


    Success
    Cor

    • Marked as answer by Mark Liu-lxf Wednesday, October 17, 2012 5:08 AM
    Sunday, October 7, 2012 10:47 AM

All replies

  • There's an online C# to Visual Basic and Visual Basic to C# converter at http://converter.telerik.com/ but I don't know anything about using a .dll to do it.

    You've taught me everything I know but not everything you know.

    • Proposed as answer by Mark Liu-lxf Tuesday, October 9, 2012 1:50 AM
    • Marked as answer by Mark Liu-lxf Wednesday, October 17, 2012 5:08 AM
    Sunday, October 7, 2012 10:46 AM
  • Yea but that is typical the C# forum. 

    Here we do conversion from C# to VB 

    http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral

    Be aware however, you can always reference a Class Library written in VB in C# (vise verse can have some problems because C# is not 100% CLI compliant like VB.)


    Success
    Cor

    • Marked as answer by Mark Liu-lxf Wednesday, October 17, 2012 5:08 AM
    Sunday, October 7, 2012 10:47 AM
  • i need a dll or somthing to be integrated in my application to convert a given file fron VB.NET code to C# code like , can anyone help?

    • Merged by Lisa Zhu Monday, October 8, 2012 6:05 AM duplicate
    Sunday, October 7, 2012 11:26 AM
  • As was answered in the VB.Net group, there are several sites that you might be able to post data to, and read from to do this.
     
    If you want to understand how this might be done "under the hood" of those sites, you could familiarize yourself with the CodeDomProvider and related classes in the .Net framework.  See the docs here: http://msdn.microsoft.com/en-us/library/system.codedom.compiler.codedomprovider.aspx

    --
    Mike
    Sunday, October 7, 2012 11:51 AM
  • You should not have to do any conversion to use a VBnet dll in a C# application.  You simple have to add the class to the C# project.  Youjust neeed to go to menu : Project : Add Existing Item and browser for the dll created in VBnet.  The VBnet project should of automatically created the dll and C# should be able to read the dll.  You also need to add the namespace of the VBnet Project to the C# code as a "Using" statement at the top of the module.  If the VBnet has more than one namespace you need to add the ones you are going to use in C#.


    jdweng

    Sunday, October 7, 2012 12:14 PM
  • I think one of us misread the question.  It appears to me that the app the OP is building is to convert C# <---> VB.Net.  You are correct with what you wrote, but it does not seem to be what they are asking.

    --
    Mike
    Sunday, October 7, 2012 12:20 PM
  • I was just providing an alternate solution.  Where somebody is referecing a "dll" in there request it sounds like they just need to use the dll rather than convert.

    jdweng

    Sunday, October 7, 2012 12:31 PM
  • Hi HendOkiel,

    You have posted  the duplicate threads . In order to create a good community environment  , I'd like to  merge these two threads  .

    Please don't  post  duplicate threads.

    Thanks for your support and  understanding .

    Regards ,


    Lisa Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Monday, October 8, 2012 6:06 AM
  • I think one of us misread the question.  It appears to me that the app the OP is building is to convert C# <---> VB.Net.  You are correct with what you wrote, but it does not seem to be what they are asking.

    --
    Mike

    Mike, 

    Then he should not write this, (assuming the comma is behind file and with fron he means from.

    i need a dll or somthing to be integrated in my application to convert a given file fron VB.NET code to C# code like , can anyone help?

    If he wants C# code whatever the source of that is, he should not be helped with this in this forum in an other way than with links to the right forum.


    Success
    Cor


    Monday, October 8, 2012 7:20 AM
  • I'm not sure why you need this feature, but it won't be possible to convert code between the languages without some inaccuracies. For that reason, no such component exists.

    There are several GUI tools that assist in this process but they are imperfect at best.


    Paul ~~~~ Microsoft MVP (Visual Basic)

    Monday, October 8, 2012 12:57 PM