【发布时间】:2014-05-06 15:54:56
【问题描述】:
如何正确地将数据保存到多维数组'dataS'中?
string servicios = getTextServicios();
// here an example for servicios value could be:
//"1==11==111\n2==22==222\n3==33==333"
//but the number of rows (\n) is dynamic
string[] lineas = Regex.Split(servicios, "\n");
string[] sublineas;
String[][] dataS = {};
foreach (string linea in lineas)
{
sublineas = Regex.Split(linea, "==");
//I want to add the lines to the array but I don't know how
dataS += new String[]{sublineas[0], sublineas[1], sublineas[2]},
}
【问题讨论】:
标签: c# .net visual-studio-2010 .net-2.0