在这里我有:
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)
我想将 ArrayList 转换为 MyStruct 类型的静态强类型数组。我怎样才能做到这一点?我对 ToArray 没有运气。
我正在使用 .NET Framework 2.0。