本文整理汇总了VB.NET中System.IO.IsolatedStorage.IsolatedStorageFile.GetFileNames方法的典型用法代码示例。如果您正苦于以下问题:VB.NET IsolatedStorageFile.GetFileNames方法的具体用法?VB.NET IsolatedStorageFile.GetFileNames怎么用?VB.NET IsolatedStorageFile.GetFileNames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.IsolatedStorage.IsolatedStorageFile
的用法示例。
在下文中一共展示了IsolatedStorageFile.GetFileNames方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: String
Dim dirNames As String() = isoFile.GetDirectoryNames("*")
Dim fileNames As String() = isoFile.GetFileNames("*")
Dim name As String
' List directories currently in this Isolated Storage.
If dirNames.Length > 0 Then
For Each name In dirNames
Console.WriteLine("Directory Name: " & name)
Next name
End If
' List the files currently in this Isolated Storage.
' The list represents all users who have personal preferences stored for this application.
If fileNames.Length > 0 Then
For Each name In fileNames
Console.WriteLine("File Name: " & name)
Next name
End If
示例2: Tester
' 导入命名空间
Imports System.IO.IsolatedStorage
Public Class Tester
Public Shared Sub Main
Dim strFile As String
Dim strDir As String
Dim myIsoStore As IsolatedStorageFile
Try
For Each strDir In myIsoStore.GetDirectoryNames("*")
Console.WriteLine(strDir)
For Each strFile In myIsoStore.GetFileNames(strDir + "/*.*")
Console.WriteLine(strFile)
Next
Next
Catch ex As IsolatedStorageException
Console.WriteLine(ex.Message)
End Try
End Sub
End Class