Variables in LINQ

  • Thread starter Thread starter Don Juan
  • Start date Start date
D

Don Juan

Hi all
I have this:

Dim var1 = From Personal In db1.Data _
Select Personal.Name

Works fine, but I need just declarate de variable in order to put this in IF
or Case structures, something like this:

Dim var1 AS (DataType)
If x=1 then
var1 =From Personal In db1.Data _
Select Personal.Name
Else
var1 =From Personal In db1.DataOld _
Select Personal.Name
End If

Thanks in advanced.
 
Hi,

Like Patrice said try to avoid multipost, use instead of that crossposting.
(Sending one messag to more newsgroups, very easy to do with windowsmail
which you use).

Then we can see we and those who search this newsgroup in feature the answer
on your question as well.

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

Back
Top