title: Ignore specific exception from throwing in C# .NET
body: <p>Is it possible to make the .NET CLR ignore certain exceptions? Eg the throw would simply be skipped and the function continues on as if nothing happened?</p>
  
  <p>Is it possible to do this without modifying where the code is thrown from? The software is .NET 4.6.1 WinForms.</p>
  
  <p>The reason is due to reverse engineering some malware which has thousands of checksum routines, I require to modify the MSIL code and hence change the checksum, removing all the routines via dnlib scripting would be very time consuming task. If I could block a specific exception I can avoid this time consuming task.</p>
  
  <p>Edit: I remember seeing in some WinForms apps a "An Exception has occured, would you like to continue or exit?" Surely this is what I need, if I can effectively reject the exception and continue on as if it never happened.</p>
  
  <p>Here is an example. How can I enable this?
  <a href="https://i.stack.imgur.com/HNtzu.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HNtzu.jpg" alt="enter image description here"></a></p>
  
  <p>Example: 
  Note that I am not writing the code. I am editing a compiled exe with dnspy so I can't easily change the code, I have to edit the MSIL byte code by hand.</p>
  
  <pre><code>public void Test(){
    throw new ArgumentException("ignore this");
  
    MessageBox.Show("Successfully ignored exception");
  
  }
  </code></pre>