The example in this article describes how to convert a list and array in C #. Share to everyone for your reference. The specific analysis is as follows:
One, list to array (from list<string> to string[])
List<string> lists=new list<string> () lists.add ("str"); Lists.add ("Hello"); string[] Str=lists.toarray ( );
Second, array goto list (from string[] to list<string>)
string[] str={"str", "string", "abc"}; list<string> lists=new list<string> (str);
I hope this article is helpful to everyone's C # programming.
In addition to the Declaration,
Running GuestArticles are original, reproduced please link to the form of the address of this article
Methods for converting between list and array in C #
This address: http://www.paobuke.com/develop/c-develop/pbk23144.html
Related Content C # wx_location Three keywords in C # params,ref,outc# the difference between abstract class and interface in C # simple way to access SQLite database (installation, connection, query, etc.)
C#?a ¢? Dμ?à????? Ê?? Ú??? Ò?? C # Implement methods for writing program run information to the log method C # image Edge detection (Roberts) delegate, event learning notes in C #
Methods for converting between list and array in C #