include::../description.adoc[]

== Noncompliant Code Example

----
public void DoSomething(string[] strings)
{
  for (int i = 0; i < strings.Length; i--)  // Noncompliant
  {
    string s = strings[i];  // IndexOutOfRangeException  when i reaches -1
    // do stuff
  }
}
----

== Compliant Solution

----
public void DoSomething(string[] strings)
{
  for (int i = 0; i < strings.Length; i++)
  {
    string s = strings[i];
    // do stuff
  }
}
----

include::../see.adoc[]

ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

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