Archive

Posts Tagged ‘C#’

Delete item from List

List list = new ArrayList();  

  •         list.add("1");   
  •         list.add("2");   
  •         list.add("3");   
  •         list.add("4");   
  • for (int i = list.size() – 1; i >= 0; i–) {   
  •             list.remove(i);   
  •         }   
  • for (int i = 0; i < list.size(); i++) {   
  •             System.out.println(list.get(i));   
  •         }
  • Categories: Network Tags: ,