如何ArrayList的转换成在C#字符串数组(字符串[]) [英] How to convert ArrayList into string array(string[]) in c#
本文介绍了如何ArrayList的转换成在C#字符串数组(字符串[])的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何转换的ArrayList
成C#的String []
?
解决方案
的String [] myArray的=(字符串[])myarrayList.ToArray(typeof运算(字符串));
结果
干杯
How can I convert ArrayList
into string[]
in C#?
解决方案
string[] myArray = (string[])myarrayList.ToArray(typeof(string));
Cheers
这篇关于如何ArrayList的转换成在C#字符串数组(字符串[])的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文