我正确地使用 For 循环和迭代器附加我的字符串它在字符串生成器的 AppendLine 方法上不起作用。
StringBuilder[] Certs;
//Just Display read outs here
var groups = from exp in main.Elements("Network")
where exp.Attribute("Nid").Value == IntializedNetworks[i].ToString()
select exp;
foreach (string exp in groups)
{
for (int x = 0; x < IntializedPostStat.Count(); x++)
{
Certs = new StringBuilder[IntializedPostStat.Count()];
int b = 0;
IntializedPostStat[x] = exp.ToString();
if (IntializedPostStat[i] != null)
{
Certs[x].Append("[Certificate] " + IntializedPostStat[x].ToString());
listBox1.Items.Add(Certs[x].ToString());
}
break;
}
}