asp.net - How to count value in array with exception? -
i have array having integer value
dim array1() integer = new integer() {14,12,0,4,25,0} i count number of elements not zero. result 4 in array above.
i used lambda expression , .findall:
dim array1() integer = new integer() {14, 12, 0, 4, 25, 0} dim matcheditems() integer = array.findall(array1, _ function(x) x > 0) msgbox(matcheditems.count) it find items within array item > 0.
Comments
Post a Comment