SoftUni.Wintellect.PowerCollections 2.0.0

.NET Standard 2.0 .NET Framework 2.0
dotnet add package SoftUni.Wintellect.PowerCollections --version 2.0.0
NuGet\Install-Package SoftUni.Wintellect.PowerCollections -Version 2.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="SoftUni.Wintellect.PowerCollections" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SoftUni.Wintellect.PowerCollections --version 2.0.0
#r "nuget: SoftUni.Wintellect.PowerCollections, 2.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install SoftUni.Wintellect.PowerCollections as a Cake Addin
#addin nuget:?package=SoftUni.Wintellect.PowerCollections&version=2.0.0

// Install SoftUni.Wintellect.PowerCollections as a Cake Tool
#tool nuget:?package=SoftUni.Wintellect.PowerCollections&version=2.0.0

Getting Started

Install the NuGet package:

Install-Package SoftUni.Wintellect.PowerCollections

Import the namespace in your C# code:

using Wintellect.PowerCollections;

Wintellect.PowerCollections.Bag<T>: Example

Console.WriteLine("Bag<T> example:");
Bag<string> bag = new Bag<string>();
bag.Add("programming");
bag.Add("C#");
bag.Add("Visual Studio");
bag.Add("dotnet");
bag.Add("C#");
bag.Add("C#");
Console.WriteLine("Contains `dotnet`: {0}", bag.Contains("dotnet"));
Console.WriteLine("Deleted the first `C#` occurence: " + bag.Remove("C#"));
Console.WriteLine("Elements: {0}", bag);  

The above code will produce the following output:

Bag<T> example:
Contains `dotnet`: True
Deleted the first `C#` occurence: True
Elements: {dotnet,C#,C#,programming,Visual Studio}

Wintellect.PowerCollections.OrderedBag<T>: Example

Console.WriteLine("OrderedBag<T> example:");
OrderedBag<string> bag = new OrderedBag<string>();
bag.Add("programming");
bag.Add("C#");
bag.Add("Visual Studio");
bag.Add("dotnet");
bag.Add("C#");
bag.Add("C#");
Console.WriteLine("Contains `dotnet`: {0}", bag.Contains("dotnet"));
Console.WriteLine("Deleted the first `C#` occurence: " + bag.Remove("C#"));
Console.WriteLine("Elements: {0}", bag);
Console.WriteLine("Range[`d`...`q`]: {0}", bag.Range("d", true, "q", true));

The above code will produce the following output:

OrderedBag<T> example:
Contains `dotnet`: True
Deleted the first `C#` occurence: True
Elements: {C#,C#,dotnet,programming,Visual Studio}
Range[`d`...`q`]: {dotnet,programming}

Wintellect.PowerCollections.Set<T>: Example

Console.WriteLine("Set<T> example:");
Set<string> set = new Set<string>();
set.Add("programming");
set.Add("C#");
set.Add("Visual Studio");
set.Add("dotnet");
set.Add("C#");
set.Add("C#");
Console.WriteLine("Contains `dotnet`: {0}", set.Contains("dotnet"));
Console.WriteLine("Deleted the first `C#` occurence: " + set.Remove("C#"));

The above code will produce the following output:

Set<T> example:
Contains `dotnet`: True
Deleted the first `C#` occurence: True
Elements: {dotnet,programming,Visual Studio}

Wintellect.PowerCollections.OrderedSet<T>: Example

Console.WriteLine("OrderedSet<T> example:");
OrderedSet<string> set = new OrderedSet<string>();
set.Add("programming");
set.Add("C#");
set.Add("Visual Studio");
set.Add("dotnet");
set.Add("C#");
set.Add("C#");
Console.WriteLine("Contains `dotnet`: {0}", set.Contains("dotnet"));
Console.WriteLine("Deleted the first `C#` occurence: " + set.Remove("C#"));
Console.WriteLine("Elements: {0}", set);
Console.WriteLine("Range[`d`...`q`]: {0}", set.Range("d", true, "q", true));

The above code will produce the following output:

OrderedSet<T> example:
Contains `dotnet`: True
Deleted the first `C#` occurence: True
Elements: {dotnet,programming,Visual Studio}
Range[`d`...`q`]: {dotnet,programming}

Wintellect.PowerCollections.BigList<T>: Example

Console.WriteLine("BigList<T> example:");
BigList<string> list = new BigList<string>();
list.Add("programming");
list.Add("C#");
list.Add("Visual Studio");
list.Add("dotnet");
list.Add("C#");
list.Add("C#");
Console.WriteLine("Elements: {0}", list);
Console.WriteLine("Elements[2]: {0}", list[2]);
list.RemoveAt(2);
Console.WriteLine("Deleted list[2]");
list.Insert(1, "TypeScript");
Console.WriteLine("Added `TypeScript` at position 1");
Console.WriteLine("Elements: {0}", list);

The above code will produce the following output:

BigList<T> example:
Elements: {programming,C#,Visual Studio,dotnet,C#,C#}
Elements[2]: Visual Studio
Deleted list[2]
Added `TypeScript` at position 1
Elements: {programming,TypeScript,C#,dotnet,C#,C#}

Wintellect.PowerCollections.Deque<T>: Example

Console.WriteLine("Deque<T> example:");
Deque<string> list = new Deque<string>();
list.AddToBack("programming");
list.AddToBack("C#");
list.AddToFront("Visual Studio");
list.AddToBack("dotnet");
list.AddToFront("C#");
list.AddToBack("C#");
Console.WriteLine("Elements: {0}", list);
Console.WriteLine("Removed element from front: {0}", list.RemoveFromFront());
Console.WriteLine("Removed element from back: {0}", list.RemoveFromBack());
Console.WriteLine("Elements: {0}", list);

The above code will produce the following output:

Deque<T> example:
Elements: {C#,Visual Studio,programming,C#,dotnet,C#}
Removed element from front: C#
Removed element from back: C#
Elements: {Visual Studio,programming,C#,dotnet}

Wintellect.PowerCollections.MultiDictionary<K, V>: Example

Console.WriteLine("MultiDictionary<K, V> example:");
MultiDictionary<string, int> score = new MultiDictionary<string, int>(true);
score.Add("Peter", 5);
score.Add("Peter", 6);
score.Add("Peter", 6);
score.AddMany("Maria", new int[] { 5, 4, 5, 4, 6 });
score.AddMany("George", new int[] { 6, 6, 5, 5 });
Console.WriteLine("Elements: {0}", score);
Console.WriteLine("Removed element `Maria -> 4`: {0}", score.Remove("Maria", 4));
Console.WriteLine("Elements: {0}", score);

The above code will produce the following output:

MultiDictionary<K, V> example:
Elements: {Maria->(5,4,5,4,6), Peter->(5,6,6), George->(6,6,5,5)}
Removed element `Maria -> 4`: True
Elements: {Maria->(5,4,5,6), Peter->(5,6,6), George->(6,6,5,5)}

Wintellect.PowerCollections.OrderedDictionary<K, V>: Example

Console.WriteLine("OrderedDictionary<K, V> example:");
OrderedDictionary<string, double> ratings = new OrderedDictionary<string, double>();
ratings.Add("Peter", 8.5);
ratings.Add("Maria", 9.7);
ratings.Add("George", 7.6);
ratings.Add("Paula", 9.2);
ratings.Add("Steve", 7.7);
Console.WriteLine("Elements: {0}", ratings);
Console.WriteLine("Range[`k`...`r`]: {0}", ratings.Range("k", true, "r", true));
Console.WriteLine("Removed element `Maria`: {0}", ratings.Remove("Maria"));
Console.WriteLine("Elements: {0}", ratings);

The above code will produce the following output:

OrderedDictionary<K, V> example:
Elements: {George->7.6, Maria->9.7, Paula->9.2, Peter->8.5, Steve->7.7}
Range[`k`...`r`]: {Maria->9.7, Paula->9.2, Peter->8.5}
Removed element `Maria`: True
Elements: {George->7.6, Paula->9.2, Peter->8.5, Steve->7.7}

Wintellect.PowerCollections.OrderedMultiDictionary<K, V>: Example

Console.WriteLine("OrderedMultiDictionary<K, V> example:");
OrderedMultiDictionary<string, int> score = new OrderedMultiDictionary<string, int>(true);
score.Add("Peter", 5);
score.Add("Peter", 6);
score.Add("Peter", 6);
score.AddMany("Maria", new int[] { 5, 5, 4, 6 });
score.AddMany("George", new int[] { 6, 6, 5 });
score.AddMany("Paula", new int[] { 6, 6, 5, 6 });
score.AddMany("Steve", new int[] { 5, 6 });
Console.WriteLine("Elements: {0}", score);
Console.WriteLine("Removed element `Maria -> 4`: {0}", score.Remove("Maria", 4));
Console.WriteLine("Elements: {0}", score);
Console.WriteLine("Range[`k`...`r`]: {0}", score.Range("k", true, "r", true));

The above code will produce the following output:

OrderedMultiDictionary<K, V> example:
Elements: {George->(5,6,6), Maria->(4,5,5,6), Paula->(5,6,6,6), Peter->(5,6,6), Steve->(5,6)}
Removed element `Maria -> 4`: True
Elements: {George->(5,6,6), Maria->(5,5,6), Paula->(5,6,6,6), Peter->(5,6,6), Steve->(5,6)}
Range[`k`...`r`]: {Maria->(5,5,6), Paula->(5,6,6,6), Peter->(5,6,6)}
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net20 net35 net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 2.0

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SoftUni.Wintellect.PowerCollections:

Package Downloads
RLib.Base

Basic Library

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on SoftUni.Wintellect.PowerCollections:

Repository Stars
Pscx/Pscx
PowerShell Community Extensions module repository
Version Downloads Last updated
2.0.0 4,394 2/28/2021
1.1.5733.22550 6,604 9/12/2015
1.0.5731.26533 3,741 9/10/2015

This release supports the .NET Standard (.NET Core and .NET Framework).