C# continue in one line ForEach -


why can't ? how manipulate code ?

system.io.directory.getfiles(@"..\data\data", "*.pdf").tolist().foreach(item => item.contains("toprint") ? continue : system.io.file.delete(item)); 

i add where before foreach

system.io.directory.getfiles(@"..\data\data", "*.pdf")       .where(item => !item.contains("toprint")).tolist()       .foreach(f=> system.io.file.delete(f)); 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -