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
                    
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="Soenneker.Extensions.Spans.Readonly.Objects" Version="4.0.19" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.Spans.Readonly.Objects" Version="4.0.19" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.Spans.Readonly.Objects" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Extensions.Spans.Readonly.Objects --version 4.0.19
                    
#r "nuget: Soenneker.Extensions.Spans.Readonly.Objects, 4.0.19"
                    
#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.
#:package Soenneker.Extensions.Spans.Readonly.Objects@4.0.19
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Extensions.Spans.Readonly.Objects&version=4.0.19
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.Spans.Readonly.Objects&version=4.0.19
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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