Help needed with converting C# to VB

  • Thread starter Thread starter staeri
  • Start date Start date
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
 
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

www.developerfusion.com/tools/convert/csharp-to-vb/
http://msdn.microsoft.com/en-us/library/aa691322.aspx

selectedProducts(i) = ListBoxProducts.Items(var).Value
i = i + 1
 
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!

www.developerfusion.com/tools/conve...sdn.microsoft.com/en-us/library/aa691322.aspx

selectedProducts(i) = ListBoxProducts.Items(var).Value
i = i + 1- Dölj citerad text -

- Visa citerad text -

Thank you very much! You solved my problem!

// SE
 
Back
Top