Results 1 to 3 of 3

Thread: Are collections readonly?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2002
    Posts
    27

    Are collections readonly?

    I have a structure of name tRecord with a public variable sAccountName as String. I load up 10 records and add them to the collection. Now, I want to take the first record and change the sAccountName property. Everytime I access it, I get the following error:

    An unhandled exception of type 'System.Exception' occurred in system.windows.forms.dll

    Additional information: Latebound assignment to a field of value type 'tRecord' is not valid when 'tRecord' is the result of a latebound expression.

    How do I edit the record?
    CodeMagician
    Ain't Codn' Fun?

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Try switching the Structure to a Class. Maybe the Value Type is messing things up.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2002
    Posts
    27
    yeah, it did, but I wonder why...
    CodeMagician
    Ain't Codn' Fun?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width