Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27512

[RESOLVED] Detect Drive

$
0
0
Hi is there a function in VB.NET somewere werte I can detect if a string is a drive. for example

something like this isdrive("c:\") or isdrive("C:") I tryed to make a function but I don;t think it very good way anyone know of other way thanks.

here my code function example.

vbnet Code:
  1. Private Function IsDrive(ByVal Source As String) As Boolean
  2.         If (Source.Length = 2) And Source.EndsWith(":") Then
  3.             Return True
  4.         End If
  5.         Return False
  6.     End Function

Viewing all articles
Browse latest Browse all 27512

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>