I have been searching for a while now, but I still can't seem to figure this out. I wrote a rather large program, and to make things more efficient I started to create structs to store more info in a variable.
All was well replacing my old code with new code, till I reached a certain point and found that blindly using a loop of integers to access the indexes of the array wouldn't work anymore... I need to access a specific struct by the information contained in a single variable within the struct (like a hashtable key), but can't seem to figure out how.
Is it possible for me to go through my array indexes in a fashion like this?:
If it helps any... My struct looks like this:
All was well replacing my old code with new code, till I reached a certain point and found that blindly using a loop of integers to access the indexes of the array wouldn't work anymore... I need to access a specific struct by the information contained in a single variable within the struct (like a hashtable key), but can't seem to figure out how.
Is it possible for me to go through my array indexes in a fashion like this?:
VB.NET:
Dim myArray(TableCount) As myStruct
Dim TableName As String = "SomeTable"
...
Dim NewVar As String = myArray([I][B]TableName[/B][/I]).Info
If it helps any... My struct looks like this:
VB.NET:
Structure Table
Dim Name As String
Dim VRC As Byte
Dim DescLength As Byte
Dim Description As String
Public Sub New(ByVal TableName As String, ByVal Derived As Boolean)
Name = TableName
If Not Derived Then
VRC = [DataBaseQueries].GetTableVRC(Name)
DescLength = [DataBaseQueries].GetDescLength(Name, VRC)
Description = [DataBaseQueries].GetTableDescription(Name, VRC, DescLength)
Else
VRC = Nothing
DescLength = Nothing
Description = Nothing
End If
End Sub
End Structure