StringExtensionsOrderByNameNatural Method
Namespace: DevCase.Extensions.StringExtensionsAssembly: 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<string> OrderByNameNatural(
this IEnumerable<string> sequence,
ListSortDirection sortDirection
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function OrderByNameNatural (
sequence As IEnumerable(Of String),
sortDirection As ListSortDirection
) As IOrderedEnumerable(Of String)
Dim sequence As IEnumerable(Of String)
Dim sortDirection As ListSortDirection
Dim returnValue As IOrderedEnumerable(Of String)
returnValue = sequence.OrderByNameNatural(sortDirection)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static IOrderedEnumerable<String^>^ OrderByNameNatural(
IEnumerable<String^>^ sequence,
ListSortDirection sortDirection
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member OrderByNameNatural :
sequence : IEnumerable<string> *
sortDirection : ListSortDirection -> IOrderedEnumerable<string>
No code example is currently available or this language may not be supported.
- sequence IEnumerableString
-
The source IEnumerableT.
- sortDirection ListSortDirection
-
A value that determine to sort the elements in ascending or descending order.
IOrderedEnumerableString
The resulting
IOrderedEnumerableTElement.
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableString. 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 sequence As IEnumerable(Of String) = {"0", "1", "100", "1000", "1001", "101", "5", "50"}
Dim sortedSequence As IOrderedEnumerable(Of String) = IEnumerableExtensions.OrderByNameNatural(sequence, ListSortDirection.Ascending)
Console.WriteLine($"Default order: {String.Join(", ", sequence)}")
Console.WriteLine($"Natural order: {String.Join(", ", sortedSequence)}")
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.