ArgumentOutOfRangeException: Argument is out of range. Parameter name: index

That error really like an annoying kid. First I tried

public string[] debugstrings;

and when I do this;

 debugtext.text = debugstrings[1];

I want to delete first element of array. But why I don’t know C# doesn’t supports the normal array functions like RemoveAt(); And I tried with ;

public System.Collections.Generic.List<string> debugstrings;

That works perfectly. But when I want

debugtext.text = debugstrings[1];

There are an error… :'<

ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[System.String].get_Item (Int32 index).....

Why this happening and what is this. Why unity doesn’t make any real solution for arrays? Thats a small thing and I must focus other important things. But why I must get an error every time? Why this happens…? Please help…

Make sure you always initialize your builtin arrays before using them:

debugstrings = new string[<IMMUTABLE-SIZE>];

In C# you can’t resize builtin arrays. From the documentation:

There are two types of arrays in
Unity, builtin arrays and normal
Javascript Arrays. Builtin arrays
(native .NET arrays), are extremely
fast and efficient but they can not be
resized

Use a mutable size container instead, such as a List.