|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Multi-dimensional array - Question on Data typesHello:
Is is possible to declare a 2-dimensional array, the first dimension being an Integer and the 2nd dimension another data type, say string? Or, is this a bad choice and a dataset may be a better way of handling multi-dimensional data where the data types may not be the same? venki vvenk wrote:
> Hello: Not that I know of, but look up Structure under Help. That's what I > > Is is possible to declare a 2-dimensional array, the first dimension being > an Integer and the 2nd dimension another data type, say string? > > venki would suggest as your best option. eg. Private Structure myStructure Dim iInteger as Integer Dim sString as String End Structure Dim myArray() as myStructure Hope this helps, ShaneO There are 10 kinds of people - Those who understand Binary and those who don't. vvenk wrote:
> Hello: venki,> > Is is possible to declare a 2-dimensional array, the first dimension being > an Integer and the 2nd dimension another data type, say string? > > Or, is this a bad choice and a dataset may be a better way of handling > multi-dimensional data where the data types may not be the same? > > venki Can you give us some more detail on what you want to accomplish? I have a feeling that there maybe a be a better way to accomplish what your after, but a brief description might help us better help you. -- Tom Shelton vvenk,
If it is only an array, than a generic list of your own class is in my idea the most simple. Class TheClass public a as string public b as string End Class Dim a As New List(Of theclass) a.Add(New theclass) a(0).a = 0 a(0).b = "mystring" Although see that the class is terrible made, properties and a constructor would make it nicer (better) Cor Show quoteHide quote "vvenk" <vv***@discussions.microsoft.com> schreef in bericht news:313885E4-43CB-4FC4-A12E-B17DD2A51D36@microsoft.com... > Hello: > > Is is possible to declare a 2-dimensional array, the first dimension being > an Integer and the 2nd dimension another data type, say string? > > Or, is this a bad choice and a dataset may be a better way of handling > multi-dimensional data where the data types may not be the same? > > venki
VB 6 developers and .Net
How to assign value to a dropdown box items? How to prevent Pasting into textbox? What is the optimal way to upload 10,000 records to Oracle DB? ADOX add bool field How do I replace unwanted characters from a string using Reg Exp? efficient routine to parse a text string Memory problem with vb.net + webServices + DLL clicking on a DataGridView's DataSource property throws exception in designer keydown event not working problem |
|||||||||||||||||||||||