Raven65
Well-known member
- Joined
- Oct 4, 2006
- Messages
- 305
- Programming Experience
- 3-5
Ok, this one thrown me for a loop, though I am sure I'm simply doing something wrong.
Trying to keep this simple, but accurate:
I have some Structures setup:
At a point my my code, I do the following:
So, in the debugger, I can see that myContract.myName="Test", but my Contract.myCharges cannot be evaluated, I only get: "In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user."
Im here debugging because the property is evaluated later in the program and it crashes, since there is nothing there..but for the life of me I cannot figure out what I am overlooking, I know it has to be some simple rule about Structures or what not....I hope that's clear enough that someone's able to help, thanks in advance!
I suspect its around the "myContracts.myCharges = new List(of Generic_Charge)" part?
Trying to keep this simple, but accurate:
I have some Structures setup:
VB.NET:
Public Structure Contract
Dim myName as String
Dim myCharges as List(of Generic_Charge)
End Structure
Public Structure Generic_Charge
Dim amount as String
End Structure
At a point my my code, I do the following:
VB.NET:
Dim myContract as new Contract
myContract.myName="TEST"
myContract.myCharges = new List(of Generic_Charge)
Dim myCharge as new Generic_Charge
myCharge.amount = "100"
myContract.myCharges.Add(myCharge)
STOP
So, in the debugger, I can see that myContract.myName="Test", but my Contract.myCharges cannot be evaluated, I only get: "In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user."
Im here debugging because the property is evaluated later in the program and it crashes, since there is nothing there..but for the life of me I cannot figure out what I am overlooking, I know it has to be some simple rule about Structures or what not....I hope that's clear enough that someone's able to help, thanks in advance!
I suspect its around the "myContracts.myCharges = new List(of Generic_Charge)" part?