Advertisement
Guest User

Untitled

a guest
Jun 14th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub Main
  2.  
  3.     Dim specs = Enumerable.Range(0, 3).ToArray
  4.     Dim tests = Enumerable.Range(0, 5).ToArray
  5.    
  6.     Dim TestSpecs = (From s In specs _
  7.                      From t In tests _
  8.                      Select New SpecimenTest With {.SpecimenID = S, .TestID = t}).ToArray
  9.    
  10.     TestSpecs.Dump
  11.    
  12.     Dim ByTestID = TestSpecs.GroupBy(Function(t) t.TestID)
  13.                    
  14.     ByTestID.Dump("ByTestID")
  15.    
  16. End Sub
  17.  
  18. ' Define other methods and classes here
  19. Class SpecimenTest
  20.         Public SpecimenID As Integer
  21.         Public TestID As Integer
  22. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement