Sub MyNiftyMethod
...process stuff...
Dim strFileName As String = "something.pdf"
Dim strExtension As String = GetExtension(strFileName)
Log(strExtension)
'prints out: pdf
End Sub
Sub GetExtension(strFileName As String) As String
If strFileName.IndexOf(".") > 0 Then
Dim parts() As String = Regex.Split("\.", strFileName)
Return parts(parts.Length - 1)
Else
Return Null
End If
End Sub