Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Utility Namespace / FileHelper Class / IsExtensionValid Method
The file name
The extension filter (e.g. gif, jpg)
In This Topic
    IsExtensionValid Method
    In This Topic
    Indicates whether a filename has a valid extension
    Syntax
    public static bool IsExtensionValid( 
       string filename,
       string filter
    )

    Parameters

    filename
    The file name
    filter
    The extension filter (e.g. gif, jpg)

    Return Value

    True if the extension appears in the filter or no filter is set; false otherwise
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also