-1

Do you see wrong code in here? I am getting a InvalidCaseException on the foreach loop that is using an INT variable:

 Microsoft.VisualBasic.Collection oHeaders = GetFieldIdsByName(msREPORT_HEADER);

foreach (int FieldId in oHeaders)
4

2 回答 2

2
foreach (object FieldId in oHeaders)
{
    int value = Int32.Parse(FieldId.ToString());
}
于 2012-11-06T23:20:23.150 回答
1
foreach (int i in oHeaders.Cast<int>())
{
     //TODO: your action here.
}
于 2012-11-06T23:32:28.000 回答