How to translate from C# to VB using the roslyn.

This sample can analyze a structure of C# source code ,and convert to a structure of VB and output formatted text code of VB. This sample include real-time viewer that is result of translate from C# to VB, and it has viewer of syntax tree as like syntax visualizer.

C# (246.9 KB)
 
 
 
 
 
(0)
1,128 times
Add to favorites
3/6/2016
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Convert C# to Java and Swift?
    2 Posts | Last post April 12, 2018
    • I'm wondering if the techniques that you demonstrate here could be used as the starting point for programs to convert C# to Java and Swift, respectively? Do you know of anyone who has tried, or of similar projects?
      
      Thanks.
    • this tool using roslyn APIs to convert C# code to VB Code. Roslyn is a .Net Framework SDK, so I'm afraid that can't convert to java or swift at now.
  • I noticed 2 issues
    1 Posts | Last post August 01, 2016
    • Great job but I noticed a few bugs.
      
      There is no option to explicitly declare variables in VB (or to include "Option Infer On")
      ).
      Static Class with <Runtime.CompilerServices.Extension()> is not valid VB code. VB required Extensions to be in a Module. I think it should be "Friend Module CS2VB" or "Partial ModuleCS2VB" and remove all the shared.