Metriks 2026.2.5
dotnet add package Metriks --version 2026.2.5
NuGet\Install-Package Metriks -Version 2026.2.5
<PackageReference Include="Metriks" Version="2026.2.5" />
<PackageVersion Include="Metriks" Version="2026.2.5" />
<PackageReference Include="Metriks" />
paket add Metriks --version 2026.2.5
#r "nuget: Metriks, 2026.2.5"
#:package Metriks@2026.2.5
#addin nuget:?package=Metriks&version=2026.2.5
#tool nuget:?package=Metriks&version=2026.2.5
Metriks
Metriks is a high-performance C# library providing dynamic multidimensional arrays (lists).
It bridges the gap between fixed-size multidimensional arrays (T[,], T[,,]) and the
flexibility of List<T>, allowing you to grow, shrink, and resize your multidimensional
data structures easily.
Features
- Specialized Implementations: Optimized
List2D<T>,List3D<T>, andList4D<T>for common dimensions. - Dynamic Resizing: Easily
Expand,Shrink, orResizeyour collections while preserving data. - Familiar API: Implements
IEnumerable,ICollection, and specialized multidimensional interfaces. - Modern C# Support: Full support for
IndexandRangesyntax on modern .NET targets. - Rich Extensions: Includes LINQ-like operations and utility extensions for multidimensional data.
- Broad Compatibility: Targets .NET Standard 2.1, .NET 5.0, .NET 8.0, and .NET 10.0.
Installation
Install via NuGet:
dotnet add package Metriks
Quick Start
2D List
using Metriks;
// Create a 2D list with initial size 0x0 (default capacity 4x4)
var list = new List2D<int>();
// Expand the list to 3x3 and fill with values
list.Expand(3, 3);
list[0, 0] = 1;
list[1, 1] = 2;
list[2, 2] = 3;
// Access using standard indexers
int value = list[1, 1]; // 2
// Resize the list while keeping existing data
list.Resize(5, 5);
// Use modern C# indexers (on supported frameworks)
var last = list[^1, ^1];
3D List
var world = new List3D<string>(10, 10, 10);
world[5, 2, 7] = "Block";
Console.WriteLine(world.Size); // 10, 10, 10
Resizing Behavior
Metriks provides several ways to change the size of your collections:
- Expand: Increases the size of the list. New elements are initialized with the default value or a provided one.
- Shrink: Decreases the size of the list, removing elements outside the new bounds.
- Resize: A general-purpose method to set the exact size, either expanding or shrinking as needed.
For detailed information on how data is preserved during resizing, see the Resize/Expand/Shrink Behavior documentation.
Performance
Metriks is designed with performance in mind:
- Uses jagged arrays internally for efficient memory management and access.
- Aggressive inlining for hot paths.
- Specialized classes for 2D, 3D, and 4D to avoid the overhead of generic N-dimensional indexing where possible.
License
This project is licensed under the MIT License – see the LICENSE file for details.
| Product | Versions 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. net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- JetBrains.Annotations (>= 2025.2.4)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
-
net10.0
- JetBrains.Annotations (>= 2025.2.4)
-
net5.0
- JetBrains.Annotations (>= 2025.2.4)
-
net8.0
- JetBrains.Annotations (>= 2025.2.4)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Metriks:
| Package | Downloads |
|---|---|
|
NeoKolors.Extensions
Package Description |
|
|
NeoKolors.Tui
Package Description |
|
|
NeoKolors.Tui.Fonts
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.2.5 | 508 | 5/29/2026 |
| 2026.2.4.1 | 127 | 5/26/2026 |
| 2026.2.4 | 83 | 5/26/2026 |
| 2026.2.3.1 | 92 | 5/15/2026 |
| 2026.2.3 | 100 | 4/19/2026 |
| 2026.2.2 | 100 | 4/17/2026 |
| 2026.2.1 | 92 | 4/17/2026 |
| 2026.2.0 | 103 | 4/15/2026 |