473,811 Members | 2,717 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

2 New Member
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.Collecti ons.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 13530
corey farrar
2 New Member
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
2722
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 end of the toolbar there is a little arrow pointing down, and if the user clicks it, it says "Add or Remove buttons." I tried the properties, etc., but can see no where to get rid of this
4
2901
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 of the framework, but I'm buggered if I can figure out which part. I've tried googling for it, but to no avail. Any ideas? Thanks
3
1253
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. - if they are under source control, VS checks them out!
1
2120
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 to run it, I get this error "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection..." Here is my code (they are all generated by the wizard): Public Class WebForm1 Inherits System.Web.UI.Page
4
1667
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 Try redim newsale.SaleDetails(0) ********* This line comes out with an error "Redim statement requires Array" *************
4
3613
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 of testing if there is data than testing the length of the xml string I used as stringreader to create the dataset, but thats a side issue. I think I tried isdbnull and is nothing and stuff like that and they cause
3
1931
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 system.object" other than get its type. Could someone tell me how to extract this info? I don't like the untidy, inefficient and anti-OO coding of using a seperate context menu for each textbox.
8
4767
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. --------------------------------- PROGRAMME -------------------------------- /* K&R2 section 1.9 exercise 1.19
1
1381
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 suggestions please? -- Bryan
1
7828
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 = new System.Data.DataTable(); workTable.TableName = "VendorList"; workTable.Columns.Add("ITEM_NAME");
0
9728
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10389
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10402
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10135
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7670
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6890
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4339
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3867
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.