Early binding problem

riversr

Member
Joined
Oct 30, 2006
Messages
12
Programming Experience
3-5
I'm a relatively new VB.net programmer so I hope there is not an obvious answer to my problem that I am missing.

I created an Arraylist that contains instances of a structure. I want to use one data item from an instance of the structure to call a function. The return value from the function will be use to set the value of another data item within the same instance of the structure. When I try this I get the following error: "Late-bound assignment to a field of value type 'Team' is not valid when 'Team' is the result of a late-bound expression."
I'm writing this code in VB.net using VS 2005

Here's some pseudo code:
---------------------------
Structure Team
Dim ItemA as String
Dim ItemB as String
End Structure

Dim teams as Arraylist
Dim team as Team
teams.Add(team) 'add the team to the arraylist

team.ItemA = team.function(team.ItemB) 'this generates the error
---------------------------
How can I avoid this problem or is it possible at all?

Thanks,
 
Back
Top