R
Rob Meade
Hi all,
I'm using some code I could swear I've used before without problem but I've
run into difficulties and cant see whats wrong....
I have a class which holds other classes - its defined as an ArrayList...
In this class I have an "Add" method...
Public Function Add(ByVal activeDirectoryIISEntry As
ActiveDirectoryIISEntry) As Boolean
' declare variable
Dim Result As Boolean
' check that our object is not nothing
If activeDirectoryIISEntry Is Nothing = False Then
' add webmaster to collection
_collection.Add(activeDirectoryIISEntry)
' populate variable
Result = True
Else
' populate variable
Result = False
End If
' return result
Return Result
End Function
An exception is being produced when this line executes...
_collection.Add(activeDirectoryIISEntry)
which is "Object reference not set to an instance of an object"..
I dont quite understand where its going wrong - when the class is passed
in - its by no means empty, it contains my "entry" class...
Any information/help would be really appreciated.
Regards
Rob
I'm using some code I could swear I've used before without problem but I've
run into difficulties and cant see whats wrong....
I have a class which holds other classes - its defined as an ArrayList...
In this class I have an "Add" method...
Public Function Add(ByVal activeDirectoryIISEntry As
ActiveDirectoryIISEntry) As Boolean
' declare variable
Dim Result As Boolean
' check that our object is not nothing
If activeDirectoryIISEntry Is Nothing = False Then
' add webmaster to collection
_collection.Add(activeDirectoryIISEntry)
' populate variable
Result = True
Else
' populate variable
Result = False
End If
' return result
Return Result
End Function
An exception is being produced when this line executes...
_collection.Add(activeDirectoryIISEntry)
which is "Object reference not set to an instance of an object"..
I dont quite understand where its going wrong - when the class is passed
in - its by no means empty, it contains my "entry" class...
Any information/help would be really appreciated.
Regards
Rob