File System File System
File System File System
DocFX + Singulink = ♥

Search Results for

    Method HasExtension

    HasExtension(string)

    Determines whether the last extension of the file name is the specified single extension. Case is ignored on every platform.

    Declaration
    bool HasExtension(string extension)
    Parameters
    Type Name Description
    string extension

    The single extension, which starts with a dot '.' character and has no other dots (e.g. ".gz"). A lone dot is accepted.

    Returns
    Type Description
    bool

    true if Extension equals the extension, ignoring case, otherwise false.

    Remarks

    Extension is an empty string when the file name has no extension.

    Exceptions
    Type Condition
    ArgumentException

    The extension is empty, isn't shaped as described for extension or has a character that names can't have in the path format.

    © Singulink. All rights reserved.