title: Best way to handle Integer overflow in C#?
body: <p>Handling integer overflow is a common task, but what's the best way to handle it in C#? Is there some syntactic sugar to make it simpler than with other languages? Or is this really the best way?</p>
  
  <pre><code>int x = foo();
  int test = x * common;
  if(test / common != x)
      Console.WriteLine("oh noes!");
  else
      Console.WriteLine("safe!");
  </code></pre>