DotNetExtras.Common 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package DotNetExtras.Common --version 1.0.0
                    
NuGet\Install-Package DotNetExtras.Common -Version 1.0.0
                    
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="DotNetExtras.Common" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DotNetExtras.Common" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="DotNetExtras.Common" />
                    
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 DotNetExtras.Common --version 1.0.0
                    
#r "nuget: DotNetExtras.Common, 1.0.0"
                    
#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 DotNetExtras.Common@1.0.0
                    
#: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=DotNetExtras.Common&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=DotNetExtras.Common&version=1.0.0
                    
Install as a Cake Tool

DotNetExtras.Common Library

The DotNetExtras.Common library implements general-purpose classes that can simplify common tasks in various .NET Core projects. This library assembles the set of utility functions that we kept carrying from one project to another and found most useful over decades of .NET development.

Use the DotNetExtras.Common library to:

  • Retrieve error information from exceptions, including immediate and inner exceptions.
  • Perform simple JSON serialization and deserialization.
  • Utilize string functions to generate tokenized strings from collections.
  • Clone and compare objects deeply.
  • Get and set object values using compound (nested) property names.
  • Convert strings to strongly-typed data types including dates, times, and collections.
  • Validate content formats such as JSON, HTML, and common patterns using built-in regular expressions.
  • Access enumeration metadata like descriptions, abbreviations, and custom attributes.
  • Check if objects are empty or determine type characteristics (primitive vs. complex).
  • Convert objects to dynamic types and perform advanced type introspection.
  • Generate fully qualified or camelCase names for variables, types, and members using the NameOf utility.
  • Retrieve application assembly information including company, version, and product details.
  • Escape special characters for LDAP queries and SQL statements.
  • Convert collections to comma-separated strings with customizable delimiters and formatting.
  • Parse delimited strings into typed collections (lists, arrays, dictionaries, hash sets).

For details, check the topics under the DotNetExtras.Common namespace section in the API documentation. For additional usage examples, see the unit tests project.

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 was computed.  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 was computed.  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.
  • net8.0

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on DotNetExtras.Common:

Package Downloads
DotNetExtras.Extended

A .NET Core library implementing less frequently used general-purpose operations.

DotNetExtras.OData

A .NET Core library implementing OData filter parsing and validation functions.

DotNetExtras.Mail

A .NET Core library implementing mail template functionality based on the Razor syntax.

DotNetExtras.Testing

A .NET Core library implementing helper functions for unit testing and validation based on xUnit.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.5 189 8/28/2025
1.0.2 145 8/25/2025
1.0.0 147 8/11/2025