ArrayList怎么存放数据
SortedList slParams = new SortedList( 3 );
slParams.Add( "@id"+, 1);
slParams.Add( "@username"+, "admin");
slParams.Add( "@password"+, "admin");
以前是用SortedList 存放数据然后用
if( slParams != null )
{for( int i = 0; i < slParams.Count; i ++ )
{
cmd.Parameters.Add( slParams.GetKey( i ).ToString(), slParams.GetByIndex( i ) );
}
}取出数据执行储过程,但是现在用了WebService后SortedList 对象不行了,而ArrayList可以,现在用ArrayList能不能实现我上面的功能呀,怎么存进去,怎么取出来呀,还有一点就是执行存储过程的参数不是固定的,有可能是很多个的,有没有高手帮忙一下。