SoftUni.Wintellect.PowerCollections 2.0.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 and Polyglot Notebooks. 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 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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net20 is compatible.  net35 was computed.  net40 was computed.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
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 (3)

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

Repository Stars
Pscx/Pscx
PowerShell Community Extensions module repository
Doddler/RagnarokRebuildTcp
Ragnarok-like server + client
BG-IT-Edu/School-Programming
Хранилище за свободно учебно съдържание по програмиране, информатика и ИТ за българските училища в помощ на ИТ учителите
Version Downloads Last updated
2.0.0 42,430 2/28/2021
1.1.5733.22550 7,120 9/12/2015
1.0.5731.26533 4,633 9/10/2015

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