What is the equivalent code for this?
I have a problem in accessing the array list in c#.Code:private procList As New ArrayList()
please help.
thank you.
Printable View
What is the equivalent code for this?
I have a problem in accessing the array list in c#.Code:private procList As New ArrayList()
please help.
thank you.
I would use:
List<type> x = new List<type>();
eg. List<string> x = new List<string>();
...
or
ArrayList al = new ArrayList();
or
string[] sa = new string[];
It doesn't work!Quote:
Originally Posted by jon.borchardt
Coz i want that to implement it here.
How would I do that?Code:
private procList = new ArrayList();
if ((procList != null))
{
int i;
for (i = 0; i <= procList.Count - 1; i++)
{
KingLeon.Help.CloseHelp((Diagnostics.Process)procList(i));
}
}
I need more info
why cant you use a generic?
it is because the api requires an arraylist?
if so, why can you not just use an arraylist?
what is not working?
KingLeon.Help.CloseHelp((Diagnostics.Process)procList(i));
should be
KingLeon.Help.CloseHelp((Diagnostics.Process)procList[i]);
problem is that you are using some vb syntax thing
Equivalent isQuote:
Originally Posted by pre_wreck
and you will use it asCode:private ArrayList procList = new ArrayList();
Code:procList.Add(someObject);