nam = nam.Substring(nam.LastIndexOf( " \ " ) + 1 ).ToUpper Dim i As Int16 = nam.LastIndexOf( " . " ) Dim ext As String = nam.Substring(i).ToUppe 转载于:https://www.cnblogs.com/T_98Dsky/archive/2005/05/09/151690.html