473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to fix "add is not a member of system.array" error?

I'm having trouble understanding why i'm getting the error 'add is not a member of system.array'

I'm using an arraylist and when I hover over my declaration of memberarray As ArrayList() the tooltip states 'Dim memberarray as System.Collections.ArrayList()

but when I hover over the error it states the above error. What am I missing?

Expand|Select|Wrap|Line Numbers
  1. Private Sub fm_all_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  2.         members = memberAdapter.GetData()
  3.         Dim memberarray As ArrayList()
  4.         lb_members.DataSource = memberarray
  5.         For Each member In members
  6.             memberarray.add(New memberlist(member.last_name & ", " & member.first_name, member.id))
  7.  
  8.             lb_members.DisplayMember = "name"
  9.             lb_members.ValueMember = "id"
  10.  
  11.             AddHandler lb_members.SelectedValueChanged, AddressOf lb_members_SelectedValueChanged
  12.         Next
  13.     End Sub
  14.  
Feb 10 '11 #1
1 13454
found it. I didn't have 'New' before ArrayList() when declaring.
Feb 10 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: NTE | last post by:
Access 2000 and 2003. I have made a custom toolbar to allow users to filter by form, etc. The only things I want to appear on that toolbar are the 3 buttons to control filtering. At the right...
4
by: Greg Bell | last post by:
Hi, Can someone tell me where to look to enable me to read "Folder Options" user settings for hidden/system files from within C#/VB.Net/Any other .NET language. I'm pretty sure it must be part...
3
by: Stefan Slapeta | last post by:
Hi all, VS 2003 shows a very strange behaviour when I add existing items to a controlled project: - if the items are not under source control, VS automatically adds them to source control. -...
1
by: fl | last post by:
I am running ASPNET on my local machine. I have a problem when I try to connect to a SQL server database table. The data looks good when I right click SqlDataAdapter1 to preview the data. When F5...
4
by: Daryl Davis | last post by:
I am having trouble with ReDim (see code below) SaleTable2's structure includes an array for SaleDetailTable2 Dim newsale As New hallsales.SaleTable2 Dim detail As New hallsales.SaleDetailTable2...
4
by: Antoine | last post by:
Herfried and Cor:- I used tracing and actually tracked down the code that was causing the problem most likely. I wonder if you wanted to comment on it. Also I wonder if there is a better way...
3
by: Alan LeHun | last post by:
I want to attach a context menu to multiple textboxes but I don't know how the extract the name of the textbox that is the subject of the event. I can't seem to do anything with "sender as...
8
by: arnuld | last post by:
i have created a solutions myself. it compiles without any trouble and runs but it prints some strange characters. i am not able to find where is the trouble. ...
1
by: =?Utf-8?B?U3B1dG5pY2s=?= | last post by:
I am experiencing problems with add/ remove programs, It take about 3-5 minutes to build the installed programs list. I have tired cleaning out all rubbish and uninstalled unnecessary prgrams. Any...
1
by: varunkumarid | last post by:
The Error on line 99 when i execute this code protected void Generate_Click(object sender, EventArgs e) { int io = 0; System.Data.DataTable workTable...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.