<p>Here I have:</p>

<pre><code>Public Structure MyStruct
   Public Name as String
   Public Content as String
End Structure

Dim oStruct as MyStruct = New MyStruct()
oStruct.Name = ...
oStruct.Content = ...

Dim alList as ArrayList = new ArrayList()
alList.Add(oStruct)
</code></pre>

<p>I'd like to convert the ArrayList to a static strongly-typed Array of type MyStruct. How can I do that? I had no luck with ToArray.</p>

<p>I am using .NET Framework 2.0.</p>

You have to cast the result of
```
ToArray
```
```
```
MyStruct[] structs = (MyStruct[]) alList.ToArray(typeof(MyStruct));
```
```