Click or drag to resize

FileName Methods

The FileName type exposes the following members.

Methods
 NameDescription
Public methodStatic memberCreate Creates a FileName instance from the string. It is valid to pass null or an empty string to this method (in that case, a null reference will be returned).
Public methodEquals(FileName)Indicates whether the current object is equal to another object of the same type.
Public methodEquals(Object)Determines whether the specified object is equal to the current object.
(Overrides ObjectEquals(Object))
Public methodExists Returns true if this directory exists in the file system.
(Overrides PathNameExists)
Public methodStatic memberGetDirectoryName Gets the name of the directory from the given file name. Throws an InvalidOperationException if a directory name could not be retrieved.
Public methodGetExtension Gets the file extension.
Public methodGetFileName Gets the file name (not the full path).
Public methodGetFileNameWithoutExtension Gets the file name without extension.
Public methodGetHashCodeServes as the default hash function.
(Overrides ObjectGetHashCode)
Public methodGetParentDirectory Gets the directory name.
(Inherited from PathName)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodHasExtension Gets whether this file name has the specified extension.
Public methodToStringReturns a string that represents the current object.
(Inherited from PathName)
Top
See Also