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
<PackageReference Include="Soenneker.Extensions.Spans.Readonly.ParameterInfos" Version="4.0.19" />
<PackageVersion Include="Soenneker.Extensions.Spans.Readonly.ParameterInfos" Version="4.0.19" />
<PackageReference Include="Soenneker.Extensions.Spans.Readonly.ParameterInfos" />
paket add Soenneker.Extensions.Spans.Readonly.ParameterInfos --version 4.0.19
#r "nuget: Soenneker.Extensions.Spans.Readonly.ParameterInfos, 4.0.19"
#:package Soenneker.Extensions.Spans.Readonly.ParameterInfos@4.0.19
#addin nuget:?package=Soenneker.Extensions.Spans.Readonly.ParameterInfos&version=4.0.19
#tool nuget:?package=Soenneker.Extensions.Spans.Readonly.ParameterInfos&version=4.0.19
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 | 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 (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