I have the following Linq,
from x in Enumerable.Range(refx - 1, 3)
from y in Enumerable.Range(refy - 1, 3)
where
(x >= 0 && y >= 0) &&
(x < array.GetLength(0) && y < array.GetLength(1)) &&
!(x == refx && y == refy)
select new Location(x,y)
I would like to have the same in the other Linq format
something like,
Enumerable.Range(refx-1,3)
.Select(x)
.Range(refy - 1, 3)
.Select(y)
.Where(x >= 0 && y >= 0) &&
(x < array.GetLength(0) && y < array.GetLength(1)) &&
!(x == refx && y == refy)
.Select new Location(x,y)
I know the above is wrong but i'd like the first in th second format, any help is greatly appriciated
also if someone is good at linq.js converting the first to linq.js would be super great!