DirectoryInfoExtensionsOrderByNameNatural Method
Namespace: DevCase.Extensions.DirectoryInfoExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static IOrderedEnumerable<DirectoryInfo> OrderByNameNatural(
this IEnumerable<DirectoryInfo> sequence,
ListSortDirection sortDirection
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function OrderByNameNatural (
sequence As IEnumerable(Of DirectoryInfo),
sortDirection As ListSortDirection
) As IOrderedEnumerable(Of DirectoryInfo)
Dim sequence As IEnumerable(Of DirectoryInfo)
Dim sortDirection As ListSortDirection
Dim returnValue As IOrderedEnumerable(Of DirectoryInfo)
returnValue = sequence.OrderByNameNatural(sortDirection)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static IOrderedEnumerable<DirectoryInfo^>^ OrderByNameNatural(
IEnumerable<DirectoryInfo^>^ sequence,
ListSortDirection sortDirection
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member OrderByNameNatural :
sequence : IEnumerable<DirectoryInfo> *
sortDirection : ListSortDirection -> IOrderedEnumerable<DirectoryInfo>
No code example is currently available or this language may not be supported.
- sequence IEnumerableDirectoryInfo
-
The source IEnumerableT.
- sortDirection ListSortDirection
-
A value that determine to sort the elements in ascending or descending order.
IOrderedEnumerableDirectoryInfo
The resulting
IOrderedEnumerableTElement.
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableDirectoryInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example.
No code example is currently available or this language may not be supported.
Dim dir As New DirectoryInfo("C:\Windows")
Dim dirs As IEnumerable(Of DirectoryInfo) = dir.EnumerateDirectories("*", SearchOption.TopDirectoryOnly)
Dim sortedDirs As IOrderedEnumerable(Of DirectoryInfo) = IEnumerableExtensions.OrderByNameNatural(dirs, ListSortDirection.Ascending)
For Each d As DirectoryInfo In sortedDirs
Console.WriteLine(d.Name)
Next
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.