title: How to know a value overflows without recurring to a runtime OverflowException
body: <p>So the question is:</p>
  
  <p>Given a native integral type that represents the largest possible number in a given compiler (language?), for example <code>ulong</code> in C#, how do you detect that an input string representing a number is going to overflow the largest value that is representable by that given type without falling back to a checked context and a runtime <code>OveflowException</code>?</p>
  
  <p>Obviously the C# compiler can detect constant integral overflows:</p>
  
  <pre><code>ulong l = 18446744073709551615; //ok
  ulong l = 18446744073709551616; //compile time error: Integral constant is too large.
  </code></pre>
  
  <p>Is the compiler using a runtime <code>OverflowException</code> (or equivalent) under the hood? If so, is there a way to actually do this without recurring to a runtime exception or building a numeric type that can hold larger numbers like <code>System.Numeric.BigInt</code>? It is worth noting that <code>BigInt</code> has no native support in C# as the following is a compile time error although the integral constant is well inside the type's range:</p>
  
  <pre><code>BigInt i = 18446744073709551616; //compile time error: Integral constant is too large.
  </code></pre>