I tested your example. What was the first line? In this case, it works:
string[] cities = new string[] { "Dehli", "Bombay", };
var longNames = cities.Where(x => x.Length > 2);
Both cities satisfy the condition, so, the both appear in the result
longNames
. Maybe, you just failed to see it? This is the iterator, so do this, for example:
foreach (string name in longNames)
System.Console.WriteLine(name);
It will print both names.
Next time, use Visual Studio Debugger, Watch (or QuickWatch) to quickly find ends.
Good luck,
—SA