Class FileExtensionCollection
A class describing a collection of file extensions, with a facultative description string.
public sealed class FileExtensionCollection
- Inheritance
-
FileExtensionCollection
Constructors
FileExtensionCollection(string)
Initializes a new instance of the FileExtensionCollection class.
public FileExtensionCollection(string extensions)
Parameters
extensionsstringThe extensions to add in this collection. Extensions must be separated with the semi-colon character (;).
FileExtensionCollection(string, string, params string[])
Initializes a new instance of the FileExtensionCollection class.
public FileExtensionCollection(string description, string extensions, params string[] additionalExtensions)
Parameters
descriptionstringThe description of this file extension collection. Can be null.
extensionsstringThe extensions to add in this collection. Extensions must be separated with the semi-colon character (;).
additionalExtensionsstring[]Additional extensions to add in this collection. Extensions inside each string must be separated with the semi-colon character (;).
Properties
ConcatenatedExtensions
Gets a string containing all extensions separated with the semi-colon character (;).
public string ConcatenatedExtensions { get; }
Property Value
Description
Gets the description of this file extension collection.
public string Description { get; }
Property Value
SingleExtensions
Gets each extension in this collection individually splitted in an IEnumerable<T>.
public IEnumerable<string> SingleExtensions { get; }
Property Value
Methods
Contains(string)
Indicates whether the given extension matches any of the extension in this collection.
public bool Contains(string extension)
Parameters
extensionstringThe extension to match. Can contain wildcards.
Returns
- bool
True if the given extension matches, false otherwise.