G
Guest
I am extending FileSystemInfo class so that I can Implement Icomparable. My
custom class looks like:
Class FSFileSystemInfo
Inherits FileSystemInfo : Implements Icomparable
Function CompareTo(ByVal o As Object) As Integer _
Implements IComparable.CompareTo
My issue comes when I try to set an instance of FSFileSystemInfo to an
object that is FileSystemInfo type. Such as:
Dim DirInfo As New DirectoryInfo("./")
Dim FSInfo() As FSFileSystemInfo
DirInfo = New DirectoryInfo(Server.MapPath(".\"))
FSInfo = DirInfo.GetFileSystemInfos("*-*.pdf") //THIS FAILS
I get a Cast Error when I do the previous statment and I am unsure how to
cast one object into another within VB.NET. Thanks for any help in advance.
custom class looks like:
Class FSFileSystemInfo
Inherits FileSystemInfo : Implements Icomparable
Function CompareTo(ByVal o As Object) As Integer _
Implements IComparable.CompareTo
My issue comes when I try to set an instance of FSFileSystemInfo to an
object that is FileSystemInfo type. Such as:
Dim DirInfo As New DirectoryInfo("./")
Dim FSInfo() As FSFileSystemInfo
DirInfo = New DirectoryInfo(Server.MapPath(".\"))
FSInfo = DirInfo.GetFileSystemInfos("*-*.pdf") //THIS FAILS
I get a Cast Error when I do the previous statment and I am unsure how to
cast one object into another within VB.NET. Thanks for any help in advance.