Lấy đường dẫn thư mục chương trình bằng VB.Net

Function App_Path() As String
        Dim AppPath As String = System.Reflection.Assembly.GetExecutingAssembly.Location()
        Dim NameAssembly As String = System.Reflection.Assembly.GetExecutingAssembly.GetName.Name
        AppPath = Left(AppPath, AppPath.Length - NameAssembly.Length - 4)
        Return AppPath
End Function

Không có nhận xét nào:

Đăng nhận xét