C csharpula csharp May 29, 2008 #1 Hello ,is there a good way to convert from string[] to List<string>. How can I do it? Thanks a lot!
J Jon Skeet [C# MVP] May 29, 2008 #2 Hello ,is there a good way to convert from string[] to List<string>. How can I do it? Thanks a lot! Click to expand... string[] array = ...; List<string> list = new List<string>(array); Or using .NET 3.5 and C# 3: var list = array.ToList(); Jon
Hello ,is there a good way to convert from string[] to List<string>. How can I do it? Thanks a lot! Click to expand... string[] array = ...; List<string> list = new List<string>(array); Or using .NET 3.5 and C# 3: var list = array.ToList(); Jon
I Ignacio Machin ( .NET/ C# MVP ) May 29, 2008 #3 Hello ,is there a good way to convert from string[] to List<string>. How can I do it? Thanks a lot! *** Sent via Developersdexhttp://www.developersdex.com*** Click to expand... Hi, It's not entirely clear what you mean, are you refering to change all the variables declaration you have from string[] to list<string> ? Or are you simply worried about one particular line of code?
Hello ,is there a good way to convert from string[] to List<string>. How can I do it? Thanks a lot! *** Sent via Developersdexhttp://www.developersdex.com*** Click to expand... Hi, It's not entirely clear what you mean, are you refering to change all the variables declaration you have from string[] to list<string> ? Or are you simply worried about one particular line of code?