So you want it as a List(of String)?
If so then convert the array to a List(of String):
Private Function GetFiles(ByVal sPath As String) As List(Of String)
Dim f() As String = Directory.GetFiles(sPath)
Return New List(Of String)(f)
End Function
or, more simply:
Private Function GetFiles(ByVal sPath As String) As List(Of String)
Return New List(Of String)(Directory.GetFiles(sPath))
End Function
"Chris" <Ch***@discussions.microsoft.comwrote in message
news:53**********************************@microsof t.com...
Hi,
Why can't his work
Private Function GetFiles(ByVal sPath As String) As Generic.List(Of
String)
Dim f() As String = Directory.GetFiles(sPath)
Return f()
End Function
Should I just create a File Class object, add to it's collection and then
return?
Thanks