Create a String Array from While Loop For Selected Values

  • Thread starter Thread starter Shayaan
  • Start date Start date
S

Shayaan

Guest
while (infopath.Read())
{
if (!string.IsNullOrEmpty(infopath.Value))
{
switch (nodekey)
{
case "Name":
output = infopath.Value;
outputx = outputx + "\n" + output + "\n";
break;
case "Address":
output1 = output + "\n" + infopath.Value;
outputx = outputx + "\n" + output1 + "\n";
break;
case "City":
output2 = output + "\n" + infopath.Value;
outputx = outputx + "\n" + output2 + "\n";
break;
}
}
nodekey = infopath.Name;
string x = outputx;
}


I have the following test code that concatenates string values and I understand this is not the right way to code.

1. How do I create a two dimensional array that will hold the key (nodekey) and the value (infopath.value)?

2. Once the array is created; how do I read it and assign these values to textbox controls?

Continue reading...
 
Back
Top