Soenneker.Extensions.Spans.Readonly.Objects
4.0.19
Prefix Reserved
dotnet add package Soenneker.Extensions.Spans.Readonly.Objects --version 4.0.19
NuGet\Install-Package Soenneker.Extensions.Spans.Readonly.Objects -Version 4.0.19
<PackageReference Include="Soenneker.Extensions.Spans.Readonly.Objects" Version="4.0.19" />
<PackageVersion Include="Soenneker.Extensions.Spans.Readonly.Objects" Version="4.0.19" />
<PackageReference Include="Soenneker.Extensions.Spans.Readonly.Objects" />
paket add Soenneker.Extensions.Spans.Readonly.Objects --version 4.0.19
#r "nuget: Soenneker.Extensions.Spans.Readonly.Objects, 4.0.19"
#:package Soenneker.Extensions.Spans.Readonly.Objects@4.0.19
#addin nuget:?package=Soenneker.Extensions.Spans.Readonly.Objects&version=4.0.19
#tool nuget:?package=Soenneker.Extensions.Spans.Readonly.Objects&version=4.0.19
Soenneker.Extensions.Spans.Readonly.Objects
Convert the runtime types in a ReadOnlySpan<object> into an array or caller-owned buffer.
Installation
dotnet add package Soenneker.Extensions.Spans.Readonly.Objects
Allocate a type array
using Soenneker.Extensions.Spans.Readonly.Objects;
ReadOnlySpan<object> arguments = [42, "status", DateTimeOffset.UtcNow];
Type[] argumentTypes = arguments.ToTypes();
ToTypes() preserves input order and returns an empty array for an empty span. Each type is obtained with GetType(), so the result represents runtime types rather than declared types.
Fill an existing buffer
Type[] reusableBuffer = new Type[8];
arguments.FillTypes(reusableBuffer);
FillTypes() avoids allocating the destination collection. The destination must have at least as many elements as the input; additional elements are left unchanged.
Both methods require every input element to be non-null because null has no runtime type. A null element causes NullReferenceException.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 is compatible. 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. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Extensions.Spans.Readonly.Objects:
| Package | Downloads |
|---|---|
|
Soenneker.Extensions.Array.Object
A collection of helpful object[] extension methods |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.19 | 109 | 8/30/2026 |
| 4.0.18 | 115 | 8/29/2026 |
| 4.0.17 | 84 | 8/29/2026 |
| 4.0.16 | 172 | 7/28/2026 |
| 4.0.15 | 167 | 7/16/2026 |
| 4.0.14 | 184 | 6/18/2026 |
| 4.0.13 | 177 | 6/5/2026 |
| 4.0.12 | 199 | 4/22/2026 |
| 4.0.11 | 184 | 3/14/2026 |
| 4.0.10 | 152 | 3/12/2026 |
| 4.0.9 | 131 | 3/12/2026 |
| 4.0.6 | 212 | 3/10/2026 |
| 4.0.5 | 163 | 3/9/2026 |
| 4.0.4 | 138 | 3/9/2026 |
| 4.0.3 | 122 | 3/9/2026 |
| 4.0.2 | 177 | 3/4/2026 |
| 4.0.1 | 175 | 1/12/2026 |
Improve runtime type documentation