DTD.Sort.Net 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package DTD.Sort.Net --version 1.0.0                
NuGet\Install-Package DTD.Sort.Net -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DTD.Sort.Net" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DTD.Sort.Net --version 1.0.0                
#r "nuget: DTD.Sort.Net, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DTD.Sort.Net as a Cake Addin
#addin nuget:?package=DTD.Sort.Net&version=1.0.0

// Install DTD.Sort.Net as a Cake Tool
#tool nuget:?package=DTD.Sort.Net&version=1.0.0                

Yet Another Sorting Library

Just as the name suggests this is just another sorting library for .Net Core.

Total alerts Language grade: C#

Available Algorithms

Description Done Comment
Bubble Sort
Insertion Sort
Merge Sort Recursive
Quick Sort Recursive
Selection Sort
Cocktail Sort

How to use

 int[] UnsortedArray = new[] {1, 5, 6, 2, 4, 3};
 SortDotNet<int>.Sort(UnsortedArray, SortType.Bubble, SortOrder.Decending);

Real Use Case

Implement IComparable<T> Interface to your model class


public class Product:IComparable<Product>
    {
        public string Id;
        public string Name;
        public float Cost;
        public float Price;

        public int CompareTo(Product other)
        {
            if (Cost > other.Cost) return 1;
            if (Cost < other.Cost) return -1;
            return 0;
        }
    }

Use it just like you would for Base Types


 SortDotNet<Product>.Sort(UnsortedArray, SortType.Bubble, SortOrder.Decending);

Implementation Credits : https://rosettacode.org/wiki/Category:Sorting_Algorithms

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.15 332 8/23/2021
1.0.2 303 8/23/2021
1.0.1 385 12/7/2020
1.0.0 450 8/8/2020