Numbers are infinite, but the types that hold them are not. Each numeric type has hard upper and lower bounds. Try to calculate or assign numbers beyond those bounds, and the result will be a value that has silently wrapped around from the expected positive value to a negative one, or vice versa.

This rule is only available for analyses run on Windows machines. It will not be reported in analyses run on any other OS.

== Noncompliant Code Example

[source,csharp]
----
public int getTheNumber(int val) {
  if (val <= 0) {
      return val;
  }
  int num = int.MaxValue;
  return num + val;  // Noncompliant
}
----

ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

include::../message.adoc[]

include::../highlighting.adoc[]

'''
== Comments And Links
(visible only on this page)

include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]
