The following query with 2 'Where' clauses:
string xml = Camlex.Query()
.Where(x => ((string)x["Title"]).Contains("Visual"))
.Where(x => ((DateTime)x["Created"]) > new DateTime(2010, 09, 01))
.ToString();
creates an XML string containing only the last Where which is not correct!
<Query><Where><Gt><FieldRef Name=\"Created\" /><Value Type=\"DateTime\">2010-09-01T00:00:00Z</Value></Gt></Where></Query>
It should be:
<Query><Where><And><Gt><FieldRef Name=\"Created\" /><Value Type=\"DateTime\">2010-09-01T00:00:00Z</Value></Gt><Contains><FieldRef Name=\"Title\" /><Value Type=\"Text\">Visual</Value></Contains></And></Where></Query>
Please fix this
int[] data = new int[] { 1, 3, 5, 10 };
int[] data2 = data
.Where(i => i < 5)
.Where(i => i > 1)
.ToArray();
// data2[0] = 3
data2.Dump();