Public Class Tester Public Shared Sub Main Dim fileDetail As IO.FileInfo fileDetail = My.Computer.FileSystem.GetFileInfo("test.txt") Console.WriteLine(fileDetail.Extension) End Sub End Class
.txt