Imports System.IOPublic Class Favorites
    Public FavoritesCollection As WebFavoriteCollection
    Public ReadOnly Property FavoritesFolder() As String
        Get
            Return Environment.GetFolderPath(Environment.SpecialFolder.Favorites)
        End Get
    End Property
    Public Sub ScanFavorites()
        ScanFavorites(FavoritesFolder)
    End Sub
    Public Sub ScanFavorites(ByVal folderName As String)
        If FavoritesCollection Is Nothing Then FavoritesCollection = New WebFavoriteCollection
        Dim objScanFolder As New DirectoryInfo(folderName)
        Dim objFavoriteFile As FileInfo
        For Each objFavoriteFile In objScanFolder.GetFiles
            If String.Compare(objFavoriteFile.Extension, ".Url", True) = 0 Then
                Dim objWebFavorite As New WebFavorite
                objWebFavorite.Load(objFavoriteFile)
                FavoritesCollection.Add(objWebFavorite)
            End If
        Next
    End Sub
End Class
这里定义的类Favorites中为什么定义一个函数ScanFavorites()后,而这个函数又调用本身呢?
Public Sub ScanFavorites()
        ScanFavorites(FavoritesFolder)
    End Sub
这段代码也不是很明白忘高人指教