Anonymous variables with LINQ

B

Bob Develd

Here is my problem :
------------------------------------------------------------------------------------------------------------------------
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim DataContextFilms As New DataContext(MaConnexion)
Dim lesFilms = DataContextFilms.GetTable(Of films)()
Dim dataFilms = From f In lesFilms _
Order By f.id_film Descending _
Where f.id_film = idFilm _
Select f

ShowMe (dataFilms)
end sub
------------------------------------------------------------------------------------------------------------------------
Wich type of variable can I use to create the procedure 'ShowMe' ?

Sub ShowMe (data as ???????????????????)
.......
.......
End Sub
That's perhaps a very simple question, but I am discovering anonymous
type....


------------------------------------------------------------------------------------------------------------------------

ANOTHER QUESTION :

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim DataContextFilms As New DataContext(MaConnexion)
Dim lesFilms = DataContextFilms.GetTable(Of films)()
Dim dataFilms = From f In lesFilms _
Order By f.id_film Descending _
Where f.id_film = idFilm _
Select f
Dim MyData = dataFilms.tolist
ShowMe (MyData )
end sub

Wich type can I use to create the procedure 'ShowMe' ?

Sub ShowMe (data as ???????????????????)
.......
.......
End Sub

Thanks for help.
 
C

Cor Ligthert[MVP]

Bob,

"Showme" is a method in your code which can contain, printing, showing on
screen or printing or whatever, but is definitely not a variable.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top