Question about MoreLinq!

  • Thread starter Thread starter Khanh01
  • Start date Start date
K

Khanh01

Guest
Hi, I am learning about linq and I am having trouble converting this format to vb.net

Here is the C# code:


int[] lengths = {1,2,3,4,5,6,7};
int[] breadths = {1,1,2,3,1,3};
int[] heights = {2,1,3,1,4};
List<int> volumesLINQ = lengths

.Cartesian(breadths, (b,l)=> b * l)

.Cartesian(heights, (a,b)=> a * b)

.ToList();volumesLINQ.Take(10).Dump();


after transcoding



Dim lengths() As Integer = {1, 2, 3, 4, 5, 6, 7}
Dim breadths() As Integer = {1, 1, 2, 3, 1, 3}
Dim heights As Integer() = {2, 1, 3, 1, 4}
Dim volumesLINQ = lengths.Cartesian(breadths, Function(b, l) b * l).Cartesian(breadths, Function(b, l) b * l)

I got an overload failed error. How do I get them to work?

Thanks a lot.

Continue reading...
 
Back
Top