1Imports NETGeographicLib 2 3Module example_DMS 4 Sub Main() 5 Try 6 Dim desc As String = "30d14'45.6""S" 7 Dim type As DMS.Flag 8 Dim ang As Double = DMS.Decode(desc, type) 9 Console.WriteLine(String.Format("Type: {0} String: {1}", type, ang)) 10 ang = -30.245715 11 Dim prec As UInteger = 6 12 desc = DMS.Encode(ang, prec, DMS.Flag.LATITUDE, 0) 13 Console.WriteLine(String.Format("Latitude: {0}", desc)) 14 Catch ex As GeographicErr 15 Console.WriteLine(String.Format("Caught exception: {0}", ex.Message)) 16 End Try 17 End Sub 18End Module 19