Soenneker.Extensions.Spans.Readonly.ParameterInfos
4.0.20
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Extensions.Spans.Readonly.ParameterInfos --version 4.0.20
NuGet\Install-Package Soenneker.Extensions.Spans.Readonly.ParameterInfos -Version 4.0.20
<PackageReference Include="Soenneker.Extensions.Spans.Readonly.ParameterInfos" Version="4.0.20" />
<PackageVersion Include="Soenneker.Extensions.Spans.Readonly.ParameterInfos" Version="4.0.20" />
<PackageReference Include="Soenneker.Extensions.Spans.Readonly.ParameterInfos" />
paket add Soenneker.Extensions.Spans.Readonly.ParameterInfos --version 4.0.20
#r "nuget: Soenneker.Extensions.Spans.Readonly.ParameterInfos, 4.0.20"
#:package Soenneker.Extensions.Spans.Readonly.ParameterInfos@4.0.20
#addin nuget:?package=Soenneker.Extensions.Spans.Readonly.ParameterInfos&version=4.0.20
#tool nuget:?package=Soenneker.Extensions.Spans.Readonly.ParameterInfos&version=4.0.20
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.21 | 1,171 | 9/15/2026 |
| 4.0.20 | 45,418 | 9/12/2026 |
| 4.0.19 | 134,265 | 8/30/2026 |
| 4.0.18 | 4,523 | 8/29/2026 |
| 4.0.17 | 102 | 8/29/2026 |
| 4.0.16 | 192,080 | 7/28/2026 |
| 4.0.15 | 98,661 | 7/16/2026 |
| 4.0.14 | 131,046 | 6/19/2026 |
| 4.0.13 | 118,861 | 6/5/2026 |
| 4.0.12 | 200,418 | 4/22/2026 |
| 4.0.11 | 117,396 | 3/14/2026 |
| 4.0.10 | 128 | 3/12/2026 |
| 4.0.9 | 152 | 3/12/2026 |
| 4.0.6 | 47,133 | 3/10/2026 |
| 4.0.5 | 22,756 | 3/9/2026 |
| 4.0.4 | 244 | 3/9/2026 |
| 4.0.3 | 131 | 3/9/2026 |
| 4.0.2 | 43,934 | 3/4/2026 |
| 4.0.1 | 173,462 | 1/12/2026 |
Use NuGet trusted publishing in publishing workflows