|Subject:||Re: DirectoryListing throwing NullReference exception for no reason|
|Posted by:||Remy Lebeau (TeamB) (email@example.com)|
|Date:||Sun, 15 May 2005|
"Aditya Gaddam" <adityagadd…@gmail.com> wrote in message
> I am pretty sure I am doing this right. I have connected to a server
> and one method using List() and StringCollection lists the folders/files
> in a directory fine. But when I try to do anything with DirectoryList,
> it keeps throwing a runtime NullReference exception.
Did you include any of the FTPListParse units into your code?
> I am not even trying to get the list of items, just the count.
Then you don't need to access the DirectoryListing at all. When you pass a
StringCollection to List(), the StringCollection receives the same raw data
that the DirectoryListing parses. You can get the Count from the
DirectoryListing throwing NullReference exception for no reason posted by Aditya Gaddam on Sun, 15 May 2005