This is a migrated thread and some comments may be shown as answers.

Linq Translation Failed

3 Answers 55 Views
Code Converter
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hardy Wang
Top achievements
Rank 1
Hardy Wang asked on 18 Nov 2011, 03:02 PM
I tried C# to VB.NET translation with Linq code, so far I have no seen any success yet.

3 Answers, 1 is accepted

Sort by
0
Todd
Telerik team
answered on 21 Nov 2011, 04:49 PM
Hello Hardy Wang,

Sorry for the trouble converting your LINQ code. Currently, the Code Converter does not well handle LINQ, though we hope it will improve in the future (with improvements to the underlying NRefactory open source engine). For most other C#/VB, the Code Converter should be able to help you convert between the syntaxes.

If you'd like , you can share an example of the LINQ you're trying to convert and we'll use that as reference test for future engine improvements.

Thanks!
-Todd

0
Bruce
Top achievements
Rank 1
answered on 25 May 2012, 04:14 PM
Here is one example:

var distinctNames = ( from row in DataTable.AsEnumerable() select row.Field<string>("Name")).Distinct();

foreach
(var name in distinctNames )
{ Console.WriteLine(name); }
0
Todd
Telerik team
answered on 23 Jul 2012, 03:07 PM
Thanks, Bruce!

We'll use that as an example as we readdress the underlying conversion engine in the converter. In the meantime, don't miss Telerik's JustDecompile, which has support for both VB and C#. If you have a lot of compiled C# code, JustDecompile could help you translate it to VB, too.

-Todd
Tags
Code Converter
Asked by
Hardy Wang
Top achievements
Rank 1
Answers by
Todd
Telerik team
Bruce
Top achievements
Rank 1
Share this question
or