Please don't multi-post. You could have cross-posted this instead to
whatever groups you wanted the question to appear in.
Here's your VB version (for reference types):
Dim str() As String = DirectCast(objArray, String())
Note that objArray is an object array which contains string elements. Again,
this won't work for value types. You can either use Array.Copy or cast each
element individually.
Dim iArray(objIntArray.Length - 1) As Integer
Array.Copy(objIntArray, iArray, objIntArray.Length)
hope that helps..
Imran.
"Phil Jones" <ph************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
If I have an array of [Object]'s, all of the same type (say [String] for
example).
Is there a quick way to cast that to a typed String array?
Presently I'm having to copy each object to a new array. I'm wondering if
there a conversion class within the framework or VB statement that makes
this quick and simple.
Cheers everyone.
--
===
Phil
(Auckland | Aotearoa)