BiMap 2.0.0

.NET 5.0
dotnet add package BiMap --version 2.0.0
NuGet\Install-Package BiMap -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="BiMap" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BiMap --version 2.0.0
#r "nuget: BiMap, 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 BiMap as a Cake Addin
#addin nuget:?package=BiMap&version=2.0.0

// Install BiMap as a Cake Tool
#tool nuget:?package=BiMap&version=2.0.0


Simple Generic Bidirectional Map for c#


BiMap<int, string> letters = new BiMap<int, string>

letters.AddPair(1, "a");
letters.AddPair(2, "b");
letters.AddPair(3, "c");

var checkA = letters.TryGetLeftToRight("a", out var outA);
var checkB = letters.TryGetLeftToRight("b", out var outB);
var checkC = letters.TryGetLeftToRight("c", out var outC);

var check1 = letters.TryGetRightToLeft("a", out var out1);
var check2 = letters.TryGetRightToLeft("b", out var out2);
var check3 = letters.TryGetRightToLeft("c", out var out3);

var a = letters.GetLeftToRight(1);
var b = letters.GetLeftToRight(2);
var c = letters.GetLeftToRight(3);

var num1 = letters.GetRightToLeft("a");
var num2 = letters.GetRightToLeft("b");
var num3 = letters.GetRightToLeft("c");

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  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. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • net5.0

    • No dependencies.

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
2.0.0 359 8/30/2021
1.0.0 544 8/6/2019