Soenneker.Extensions.Type 11.0.725

Prefix Reserved
dotnet add package Soenneker.Extensions.Type --version 11.0.725
                    
NuGet\Install-Package Soenneker.Extensions.Type -Version 11.0.725
                    
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.Type" Version="11.0.725" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.Type" Version="11.0.725" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.Type" />
                    
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.Type --version 11.0.725
                    
#r "nuget: Soenneker.Extensions.Type, 11.0.725"
                    
#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.Type@11.0.725
                    
#: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.Type&version=11.0.725
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.Type&version=11.0.725
                    
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.Type

Reflection and text-conversion helpers for runtime Type values.

Installation

dotnet add package Soenneker.Extensions.Type

Convert text to a target type

using Soenneker.Extensions.Type;

object? port = typeof(int).ConvertPropertyValue("8080");
object? ids = typeof(Guid[]).ConvertPropertyValue("6f9619ff-8b86-d011-b42d-00cf4fc964ff, 7c9e6679-7425-40de-944b-e07fc1f90ae7");

ConvertPropertyValue() supports strings, numeric primitives, booleans, DateTime, DateTimeOffset, TimeSpan, Guid, Uri, char, DateOnly, TimeOnly, enums, nullable values, arrays, and List<T>. Parsing is invariant-culture and trims the input. Arrays and lists use comma-separated tokens.

Invalid scalar input returns null. A collection also returns null when a non-empty element cannot be converted, rather than silently substituting a default value. An empty token is valid as null only for Nullable<T> elements. Enum parsing is case-insensitive and, like Enum.TryParse, accepts numeric values even when the enum does not define them.

URI conversion accepts relative or absolute URIs. Date/time conversion parses text but does not apply an application-specific time-zone policy.

Read JSON property names

string jsonName = typeof(Order).GetJsonPropertyName(nameof(Order.OrderId));

GetJsonPropertyName() returns JsonPropertyNameAttribute.Name when the exact public CLR property has that attribute; otherwise it returns the input name. It does not apply a JsonSerializerOptions.PropertyNamingPolicy. Successful property lookups are cached with a bounded cache.

Inspect types

  • GetFieldsOfType<T>() reads public static fields, including inherited public static fields, whose declared field type is assignable to T.
  • GetInterfacesAndSelf() returns implemented interfaces for a class. For an interface, it returns that interface first, followed by its inherited interfaces in reflection order.
  • IsNumeric() recognizes the built-in CLR integer and floating-point types, including decimal. It does not unwrap nullable types or classify enums and user-defined numeric types as numeric.
Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Soenneker.Extensions.Type:

Package Downloads
Soenneker.Extensions.Object

A collection of helpful Object extension methods

Soenneker.Json.CollectionConverter

A System.Text.Json converter for (de)serializing collections

Soenneker.SmartEnum.Abbreviated

A derivative of Ardalis' SmartEnum, adding support for abbreviations

Soenneker.Excel.Util

Provides methods for reading and writing Excel files using strongly-typed objects with automatic property mapping and basic type conversion

Soenneker.Csv.SepCsvUtil

Using the Sep CSV library, provides methods for reading and writing CSV files using strongly-typed objects with automatic property mapping and basic type conversion

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.725 2,585 11/11/2026
11.0.724 436 11/11/2026
11.0.723 326 11/10/2026
11.0.722 15,805 10/26/2026
4.0.720 8,322 10/14/2026
4.0.719 952 10/14/2026
4.0.717 845 10/14/2026
4.0.711 1,007 10/13/2026
4.0.710 161 10/12/2026
4.0.707 4,858 10/11/2026
4.0.706 416 10/11/2026
4.0.705 14,410 9/26/2026
4.0.704 2,418 9/24/2026
4.0.703 8,067 9/15/2026
4.0.702 432 9/15/2026
4.0.701 8,527 9/12/2026
4.0.700 133 9/12/2026
4.0.699 11,598 9/7/2026
4.0.698 15,272 8/30/2026
4.0.697 2,880 8/30/2026
Loading failed

Update dependency Soenneker.Enumerables.CommaSeparated to 11.0.34 (#814)