Search code examples
c#numberscompiler-flags

What is compiler flagging for numbers in C#?


What is compiler flagging for numbers in C#? What is the advantage of this work? I can't understand this concept.


Solution

  • There is a compiler flag /checked. It deals with numeric over and under flows.

    Using it will cause a value outside the range of the data type to cause a run-time exception.