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:
<ul><li>-1 if <code class="paramref">x</code> is a folder and <code class="paramref">y</code> is not.</li><li>1 if <code class="paramref">y</code> is a folder and <code class="paramref">x</code> is not.</li><li>0 if both objects are either folders or non-folders.</li></ul>
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.