System.IO.Path.GetFileName C# (CSharp) 메소드

GetFileName() 개인적인 메소드

private GetFileName ( string path ) : string
path string
리턴 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