how to use "where" in the List<int> like c# in android -
i need select multiple items. need numbers greater 50. not know how write code. sample c # code defines me need.is supported in android?
list<int> _numbers=new arraylist<integer>(); _numbers.add(111); _numbers.add(54); _numbers.add(25); _numbers.add(552); _numbers.add(58); // c# code : _numbers.where(d=>d>=50);
iterate though list , put values greater 50 list. can integers greater 50 if-clausel:
list<int> xxxx = new arraylist<integer> for(int value : _numbers){ if(value > 50) xxxx.add(value ) }
Comments
Post a Comment