I'm not very familiar with VB.net at the moment and having some trouble converting the following code to C#.
Dim itemList As New ArrayList
Dim strMyitemList(itemList.Count - 1) As String
For x = 0 To (itemList.Count - 1)
strMyitemList(x) = itemList(x)
Next
So far I've got:
ArrayList itemList = new ArrayList();
string[] strMyitemList = new string[itemList.Count -1];
for (int x = 0; x <= (itemList.Count - 1); x++)
{
strMyitemList[x] = itemList(x);
}
I'm getting the error CS0149 "Method name expected" on "itemList(x)".
Thanks
ArrayListanymore, there is no reasonitemList.Count - 1when declaring the array. It is only used in VB.NET because it handles arrays differently.