System.IO.Path.GetFileName C# (CSharp) Method

GetFileName() private method

private GetFileName ( string path ) : string
path string
return string
        public static string GetFileName(string path)
        {
            if (path == null)
                return null;
            
            int offset = PathInternal.FindFileNameIndex(path);
            int count = path.Length - offset;
            return path.Substring(offset, count);
        }

Usage Example

示例#1
0
		public InMemoryFile(string filePath)
		{
			Path = new Path(filePath);
			Name = Path.GetFileName(filePath);
			NameWithoutExtension = Path.GetFileNameWithoutExtension(filePath);

			_LastModifiedTimeUtc = null;
		}
All Usage Examples Of System.IO.Path::GetFileName