在ArrayList中的某个位置插入c#

vin*_*ini 1 c# arraylist c#-4.0

ArrayList ArrAcc = new ArrayList(); 
string ArrValue = ClsContractAccount.GetAccount(LngContract, "R"); 
ArrAcc.Insert(1, ArrValue);
Run Code Online (Sandbox Code Playgroud)

当我尝试执行此查询时,在执行时出错了,获取ArgumentOutOfRangeException?

Agh*_*oub 5

您必须从0索引开始

ArrAcc.Insert(0, ArrValue);
Run Code Online (Sandbox Code Playgroud)