How to get the path root in VB.NET

1 Answer

0 votes
Imports System.IO

Module Module1

    Sub Main()

        Dim s As String
        Dim root As String

        s = "d:\\data.txt"

        root = Path.GetPathRoot(s)

        Console.WriteLine(root)

    End Sub

End Module

' run:
' 
' d:\

 



answered Aug 16, 2018 by avibootz

Related questions

...