VB.NET 中OpenFileDg文件名,路径的获取

来源:互联网 发布:小米平板2windows 驱动 编辑:程序博客网 时间:2024/05/21 10:38
    Private Function GetFileName(ByVal FileName As StringAs String

        
Dim Names() As String = FileName.Split(New Char() {""})
        
Dim Name As String = Names(Names.Length - 1)
        
Return Name
    
End Function

    
Private Function GetPath(ByVal FileName As StringAs String

        
Dim path As String = FileName.Replace(GetFileName(FileName), "")
        
Return path
    
End Function
 
原创粉丝点击