Method CompareByIsFolder
CompareByIsFolder(FileListBoxItem, FileListBoxItem)
Compares two FileListBoxItem objects based on whether they represent folders.
public static int CompareByIsFolder(FileListBoxItem x, FileListBoxItem y)
Parameters
xFileListBoxItemThe first FileListBoxItem to compare. Can not be null.
yFileListBoxItemThe second FileListBoxItem to compare. Can not be null.
Returns
- int
A signed integer that indicates the relative order of the objects:
- -1 if
xis a folder andyis not. - 1 if
yis a folder andxis not. - 0 if both objects are either folders or non-folders.
- -1 if
Remarks
This method prioritizes folder items over non-folder items. If both items are of the same type (either both folders or both non-folders), they are considered equal in this comparison.