System.IO.Path.Path.findExtension C# (CSharp) Méthode

findExtension() private static méthode

private static findExtension ( string path ) : int
path string
Résultat int
		private static int findExtension (string path)
		{
			// method should return the index of the path extension
			// start or -1 if no valid extension
			if (path != null){
				int iLastDot = path.LastIndexOf ('.');
				int iLastSep = path.LastIndexOfAny ( PathSeparatorChars );

				if (iLastDot > iLastSep)
					return iLastDot;
			}
			return -1;
		}