W
Walker Moore
I have a method which adds strings to an ArrayList then on the final line
converts it to a string array (which it returns).
ArrayList results = new ArrayList();
... stuff ...
return (string[])results.ToArray(typeof(string));
Is this safe? I don't need to initialize the string[] array do I? I'm
assuming ArrayList.ToArray does that.
converts it to a string array (which it returns).
ArrayList results = new ArrayList();
... stuff ...
return (string[])results.ToArray(typeof(string));
Is this safe? I don't need to initialize the string[] array do I? I'm
assuming ArrayList.ToArray does that.