Skip to content

Instantly share code, notes, and snippets.

@iricigor
Created October 18, 2017 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iricigor/e59e2d38be9af5781d38bd80b12170f8 to your computer and use it in GitHub Desktop.
Save iricigor/e59e2d38be9af5781d38bd80b12170f8 to your computer and use it in GitHub Desktop.
Continue vs Finally in PowerShell
for ($i=-1;$i -lt 2; $i++) {
try {
"`nTry $i"
1/$i | out-null
} catch {
"Catch $i"
continue
} finally {
"Finally $i"
}
"Out $i"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment