任何解决方案都值得赞赏,不依赖于这种方法。
foreach(var x in xs){
var y = getValuesfromX(x);
foreach(var yvalue in y){
//Here I want if(yvalue is LESS than 100 and if (yvalue - previousyvalue) not GEATER than 30){
// perform action
//else, quit looping xs am not interested anymore after the difference reached 30