How to create and populate a list of <string []> in a string? (FROM#)

I need to create and populate a string (is there a word for this operation?) An instance of List<string[]> . How to do it?

+7
source share
4 answers
 var list = new List<string[]> { new[] { "One", "Two", "Three" }, new[] { "Four", "Five", "Six" } }; 
+16
source

Do you mean this?

 var stringList = new List<string[]> { new string[] { "stringa1", "stringa2", "stringa3" }, new string[] { "stringb1", "stringb2", "stringb3" }, new string[] { "stringc1", "stringc2", "stringc3" } }; 
+2
source
 var list_array = new List<string[]> { new[]{"a", "b", "c" }, new[] {"f", "g", "h"}}; 
+1
source
 var test = new List<string> { "test", "test2" }; 
+1
source

All Articles