string output = (from s in abc.longs
group s by DateTime.FromFileTimeUtc(s).Minutes < 1
.... // so on so forth
The question I have, is I do "DateTime.FromFileTimeUtc(s) like 10 times here, is there any way to do
from s in abc.longs
t = DateTime.FromFileTimeUtc(s).Minutes
group by t < 1
From stackoverflow
-
Yes, using the
letkeyword, which let you declare a symbol you can use later on in the query:from s in abc.longs let t = DateTime.FromFileTimeUtc(s).Minutes group by t < 1You can find a lot of examples using Google.
mjsabby : or even Bing :-)
0 comments:
Post a Comment