PROTECTED]
> Subject: Re: [DOTNET] ArrayList.ToArray question
>
> Reggie Burnett [mailto:[EMAIL PROTECTED]] wrote:
>
> > why doesn't this compile to properly return a StructType[] ?
>
> You need to cast... ArrayList::ToArray returns an Object[].
>
>
> ret
Reggie Burnett [mailto:[EMAIL PROTECTED]] wrote:
> why doesn't this compile to properly return a StructType[] ?
You need to cast... ArrayList::ToArray returns an Object[].
return (StructType[])arList.ToArray(typeof(StructType))
HTH,
Drew
You can read messages from the DOTNET archive, unsubs
What is wrong with this?
Public struct StructType {
Public Int mem1;
Public int mem2;
}
... after adding several elements of type STructType to an arraylist...
return arList.ToArray( typeof(StructType) )
why doesn't this compile to properly return a Stru