Dim ifo As new FileInfo("D:\桌面\1:123.pptx")
MessageBox.Show(ifo.Name)
如以上文件名称有:的文件名
代码执行出错,错误信息:
System.NotSupportedException: 不支持给定路径的格式。
在 System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
在 System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
在 System.IO.FileInfo.Init(String fileName, Boolean checkHost)
在 System.IO.FileInfo..ctor(String fileName)
在 UserCode.Test()