Re: Converting from ArrayList to non System.Type array

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Jack Addington wrote:

> I have a method that takes an array of nodes (UltraNode[]) as a parameter.
>
> I've got an arrayList of objects that I am trying to convert to UltraNodes
> and pass to the method but I cannot seem to get the syntax right.
>
> I thought I was able to go ArrayList.ToArray(typeof(UltraNode)) and be done
> with it.

Close. You want

(UltraNode[]) ArrayList.ToArray(typeof(UltraNode))

--

www.midnightbeach.com
.



Relevant Pages

  • Newbie struggling with function pointers
    ... And I have an array of what I _hope_ are pointers to functions (if they ... trying to decipher all the tutorials on function pointers I've come ... The syntax, not so clear... ... Prev by Date: ...
    (comp.lang.c)
  • array question (newbie)
    ... Having an array: ... And refering to a particular element, which syntax is correct? ... Prev by Date: ...
    (comp.lang.perl.misc)
  • newbie question vb.net bits
    ... If I have a 2 byte byte array, how do I test bits within the bytes to ... syntax or how to get to this level. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vb)
  • Datalist control is bound by an element of the array ???
    ... Data displayed on the datalist control is bound by the column name of the ... Could I use an element of the array which has the name ... Is there anything wrong with the syntax? ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: .join() !== + a + b; // for some a and b
    ... The one seemed obvious until your more detailed explanation below, ... that made it necessary to look deeper into the syntax. ... one an Array object reference and one ... seems wrong with the expression evaluation on the left side of the logical ...
    (comp.lang.javascript)