Xceed .NET Libraries Documentation
SizeFilter

Welcome to Xceed .NET, .NET Standard and Xamarin Libraries! > Basic Concepts > Filters > SizeFilter

The SizeFilter class can be used to filter files according to their size.

Demonstration

Retrieve all the files in a folder that are between 5k and 10k in size.

VB.NET Copy Code

Dim filter As New SizeFilter()

filter.MaxSize = 10240
filter.MinSize = 5120 

Dim files As AbstractFile() = myFolder.GetFiles( True, filter )

C# Copy Code

SizeFilter filter = new SizeFilter();

filter.MaxSize = 10240;
filter.MinSize = 5120; 

AbstractFile[] files = myFolder.GetFiles( true, filter );