Soenneker.Extensions.Spans.Readonly.ParameterInfos 4.0.19

Prefix Reserved
dotnet add package Soenneker.Extensions.Spans.Readonly.ParameterInfos --version 4.0.19
                    
NuGet\Install-Package Soenneker.Extensions.Spans.Readonly.ParameterInfos -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.ParameterInfos" 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.ParameterInfos" Version="4.0.19" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.Spans.Readonly.ParameterInfos" />
                    
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.ParameterInfos --version 4.0.19
                    
#r "nuget: Soenneker.Extensions.Spans.Readonly.ParameterInfos, 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.ParameterInfos@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.ParameterInfos&version=4.0.19
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.Spans.Readonly.ParameterInfos&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.ParameterInfos

Extract parameter types from a ReadOnlySpan<ParameterInfo> in declaration order.

Installation

dotnet add package Soenneker.Extensions.Spans.Readonly.ParameterInfos

Create a type array

using Soenneker.Extensions.Spans.Readonly.ParameterInfos;
using System;
using System.Reflection;

MethodInfo method = typeof(string).GetMethod(nameof(string.StartsWith), [typeof(string)])!;
ReadOnlySpan<ParameterInfo> parameters = method.GetParameters();

Type[] parameterTypes = parameters.ToTypes();

This is useful when adapting reflection metadata to APIs that accept a type array. ToTypes() allocates the returned array and returns an empty array for an empty span.

Reuse a destination

Type[] reusableBuffer = new Type[parameters.Length];
parameters.FillTypes(reusableBuffer);

FillTypes() performs no allocation of its own. The destination must contain at least one slot per input parameter; extra slots remain unchanged. The resulting values are the reflection API's exact ParameterType values, including by-reference, pointer, array, and constructed generic types.

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 (2)

Showing the top 2 NuGet packages that depend on Soenneker.Extensions.Spans.Readonly.ParameterInfos:

Package Downloads
Soenneker.Reflection.Cache

The fastest .NET Reflection cache

Soenneker.Extensions.ParameterInfo

A collection of helpful ParameterInfo (Reflection) extension methods

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.19 37,377 8/30/2026
4.0.18 4,501 8/29/2026
4.0.17 82 8/29/2026
4.0.16 190,091 7/28/2026
4.0.15 98,490 7/16/2026
4.0.14 128,315 6/19/2026
4.0.13 118,710 6/5/2026
4.0.12 197,772 4/22/2026
4.0.11 116,949 3/14/2026
4.0.10 125 3/12/2026
4.0.9 149 3/12/2026
4.0.6 47,122 3/10/2026
4.0.5 22,754 3/9/2026
4.0.4 240 3/9/2026
4.0.3 124 3/9/2026
4.0.2 43,913 3/4/2026
4.0.1 173,016 1/12/2026

Improve parameter span documentation