Graeme Pariot

Graeme Pariot

  • NA
  • 157
  • 32k

For loop not working

Apr 14 2014 11:57 AM
  //from com VBA call below this loop worked fine with array  
 
for (int i = 0; i < myLength; i++)
  
{
     
string[] ar = Array.ConvertAll((object[])o1[i], x => (string)x);
     
List<string> st = new List<string>(ar);
     
foreach (var x in st)
         str
+= "*" + x + "*";
   
}

  
//from com VBA call below this loop not worked fine with array 
 
   for (int i = 0; i < myLength; i++)
  
{
     
string[] stt = (string[])s4[i];
     
for (int p = 0; p< stt.Length; p++)
     
{
         val
+= stt[p];
     
}
   
}

Answers (4)