This article is a mirror article of machine translation, please click here to jump to the original article.

View: 17380|Reply: 1

[Source] .net list and array

[Copy link]
Posted on 12/14/2015 12:29:19 PM | | |

1. Go from System.String[] to List<System.String>
System.String[] str={"str","string","abc"};
List<System.String> listS=new List<System.String>(str);

2, Go from List<System.String> to System.String[]
List<System.String> listS=new List<System.String>();
listS.Add("str");
listS.Add("hello");
System.String[] str=listS.ToArray();




Previous:SC Create creates a Windows system service
Next:C# WPF uses ZXing to generate QR codes Introduction to ImageSource
Posted on 12/14/2015 3:55:14 PM |
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com