System.IO.DirectoryInfo.GetFiles.Getlength
-
i am trying to get the number of files returned when you use the getfiles function so i dont have to run through them first. the getlegth part accepts a parameter called dimension which is a zero based array but i dont know what to give it any help would be much appreciated
-
i am trying to get the number of files returned when you use the getfiles function so i dont have to run through them first. the getlegth part accepts a parameter called dimension which is a zero based array but i dont know what to give it any help would be much appreciated
:confused: System.IO.DirectoryInfo.GetFiles() returns an array of FileInfo. You should be able to use the Length property of the array to find out how many there are. GetLength() is for multi-dimensional arrays; you can specify 0 for the dimension to get the length of a single-dimension array. -- Mike Dimmick