Understanding Structures in VB.NET
A structure in VB.NET is simply a composite data type consisting of a number elements of other types. A VB.NET structure is a value type and the instances or objects of a structure are created in stack.
The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: Understanding Structures in VB.NET

ScoteditedPosted May 3, 2007, 2:53 PM EDTEdited May 3, 2007, 2:54 PM EDT
I'm having a problem with trying to send a structure through web services. Here is what my error is. “Unable to cast object of type 'Scot_s_Demo.searchparams' to type 'Scot_s_Demo.getaninfocard.Structmap'.” It calls a function called Structmap that isn't anything that we have programmed. Here is my other code... Private Sub btn_sinfocard_click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btn_sinfocard.Click Scot_s_Demo.dcs.mainman.techval.InfocardServiceService Dim myparams = New Scot_s_Demo.Searchparams() myparams.InfoCard_Number = "444" myparams.Title = "my title" myparams.Revision = "1" myparams.Lifecycle_Status = "my vault" lbl_insertdocnumber.Text = myparams.InfoCard_Number lbl_inserttitle.Text = myparams.Title lbl_insertrev.Text = myparams.Revision lbl_insertvault.Text = myparams.Lifecycle_Status lbl_Connection.Text = connectionID lbl_userName.Text = username 'myparams1 = myparams Dim obj As Scot_s_Demo.getaninfocard.InfocardServiceService Dim results = obj.getInfoCardList(connectionID, myparams) lbl_userName.Text = results End Sub Any ideas?