S
staeri
I need help converting the following code from C# to VB:
int[] selectedIndexProducts = ListBoxProducts.GetSelectedIndices();
string[] selectedProducts = new string[selectedIndexProducts.Length];
int i = 0;
foreach (int var in selectedIndexProducts)
{
selectedProducts[i++] = ListBoxProducts.Items[var].Value;
}
Especially this line is difficult for me to convert:
"selectedProducts[i++] = ListBoxProducts.Items[var].Value;"
I'm very grateful for help!
// SE
int[] selectedIndexProducts = ListBoxProducts.GetSelectedIndices();
string[] selectedProducts = new string[selectedIndexProducts.Length];
int i = 0;
foreach (int var in selectedIndexProducts)
{
selectedProducts[i++] = ListBoxProducts.Items[var].Value;
}
Especially this line is difficult for me to convert:
"selectedProducts[i++] = ListBoxProducts.Items[var].Value;"
I'm very grateful for help!
// SE