Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

Convert, C#-ToVB.Net, LINQ Select omitted

$
0
0

When converting from C# To VB.Net, a LINQ query has its "select" omitted, and the select variable gets appended to the "in" variable. So ...

            List<String> list =
                (from string s in array
                select s).ToList();//"select s" will become "s" appened to "array"

... becomes...

            Dim list As List(Of [String]) = (From s In arrays).ToList()'"Select s" got converted into "s"

This does not seem to be dependent upon what I am calling the array variable "array" used in "in", or the select variable "s", as...

            List<String> list =
                (from string y in x
                select y).ToList();//"select s" will become "s" appened to "array"

... becomes ...

            Dim list As List(Of [String]) = (From y In xy).ToList()
            '"select s" will become "s" appened to "array"

These are just code snippets; I can provide the full input .CS file.

This appears to be an issue for the version I tested: 4.2, 4.3, 4.4

 

Steve

 


Viewing all articles
Browse latest Browse all 1764

Trending Articles