Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created July 15, 2015 21:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save angelovstanton/9d0675f88d19230339a9 to your computer and use it in GitHub Desktop.
try
{
throw new Exception("C#");
}
catch (Exception ex) if (ex.Message == "C#")
{
// this one will execute.
}
catch (Exception ex) if (ex.Message == "VB.NET")
{
// this one will not execute
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment