nyk0r

R# is Smart YOBA

Sep 7th, 2011
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1. -- before
  2. foreach (var file in files)
  3. {
  4.     if (!Results.CheckFile(file))
  5.     {
  6.         MessageBox.Show(String.Format("File {0} has unknown format.", file));
  7.         return;
  8.     }
  9. }
  10.  
  11. -- after
  12. foreach (var file in files.Where(file => !Results.CheckFile(file)))
  13. {
  14.     MessageBox.Show(String.Format("File {0} has unknown format.", file));
  15.     return;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment