Hi there... Where are you instantiating the arraylist object? This error
happens because its value is nothing (null). You can instantiate it in the
constructor or just where it is declared... For example
Class INDICE
private m_name As String, _
m_comp As ArrayList
Public Sub New()
m_comp = New ArrayList
End Sub
' Properties come here... they expose my class' private fields
End Class
Or like this..
Class INDICE
private m_name As String, _
m_comp As New ArrayList
Public Sub New()
End Sub
' Properties come here... they expose my class' private fields
End Class
Regards,
--
Angel J. Hernández M.
MCP - MCAD - MCSD - MCDBA
http://groups.msn.com/desarrolladoresmiranda http://www.consein.com
"Bernard Bourée" <be*****@bouree.net> escribió en el mensaje
news:%2***************@TK2MSFTNGP12.phx.gbl...
I have a class named INDICE that have two properties NAME and COMP
Name is declared as string
COMP is declared as an ArrayList
I have the following code
Dim Ind as New Indice
Ind.Name="Something"
Ind.Comp.Add("XXX")
THis last line give me an error "The reference to an object is not
referenced to its intance"
Thanks for your help
Bernard