5/19/2023 0 Comments Visual basic array![]() I get the follwing error:-Īn unhandled exception of type 'System.InvalidCastException' occurred in mscorlib.dllĪdditional information: At least one element in the source array could not be cast down to the destination array type. The problem comes when I try to add the contents of my newly created arraylist to the array of tag elements oTagEl() using oTagEl = CType(oArrayList.ToArray(GetType(TagElement)), TagElement()). That works great and Debug.WriteLine( & " - " & oItem.Value) proves it works. OEl in this case will be a cell that contains tags (don't worry what they are.) and I'm using oArrayList.AddRange(oEl.GetTags) to create an ArrayList from the tags that are in oEl (the cell). I have this code which I am trying to get to work.ĭim oTagEl() As MicroStationDGN.TagElement I am currently working on a small VB.NET utility that accesses the Microstation VBA object model via COM.
0 Comments
Leave a Reply. |