Wow.  That's one of those times you bonk your head and wonder why you
didn't bother to try that. :-D

Thanks!

> -----Original Message-----
> From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf
Of
> Marsh, Drew
> Sent: Thursday, May 09, 2002 12:47 PM
> To: [EMAIL 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[].
>
> <codeSnippet langauage="C#">
> return (StructType[])arList.ToArray(typeof(StructType))
> </codeSnippet>
>
> HTH,
> Drew
>
> You can read messages from the DOTNET archive, unsubscribe from
DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to