Help needed with converting C# to VB

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
 
G

Guest

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
 
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!

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
474,001
Messages
2,570,255
Members
46,853
Latest member
GeorgiaSta

Latest Threads

Top