Xceed .NET Libraries Documentation
GetFiltersFromParams Method


Xceed.FileSystem Assembly > Xceed.FileSystem Namespace > Filter Class : GetFiltersFromParams Method
An array of objects that must be converted to an array of Filter objects.
Converts a generic array of parameters to an array of Filter objects.
Syntax
'Declaration
 
Public Shared Function GetFiltersFromParams( _
   ByVal ParamArray filters() As Object _
) As Filter()
'Usage
 
Dim filters() As Object
Dim value() As Filter
 
value = Filter.GetFiltersFromParams(filters)
public static Filter[] GetFiltersFromParams( 
   params object[] filters
)

Parameters

filters
An array of objects that must be converted to an array of Filter objects.

Return Value

An array of Filter objects.
Remarks

To filter a list of files or folders, you can pass a variable number of objects in the filters parameter. These objects may be of the following types:

Object type Type of filter applied
System.String The string is assumed to be a file mask, and a NameFilter object is automatically created for the passed string, with FilterScope.File as the default FilterScope.
System.IO.FileAttributes A AttributeFilter object is automatically created for the provided attributes, with FilterScope.File as the default FilterScope.
Filter The provided Filter object is used as-is.
Array of System.Object Each object in the array may be of the types described in this table, and is used accordingly.
Other If any other type is found, an exception is thrown.

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

Reference

Filter Class
Filter Members