How to convert ArrayList into string array(string[]) in c#

后端 未结 7 800
无人及你
无人及你 2021-01-03 21:31

How can I convert ArrayList into string[] in C#?

7条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-03 21:50

    use .ToArray(Type)

    string[] stringArray = (string[])arrayList.ToArray(typeof(string));
    

提交回复
热议问题