.NET 5.0
dotnet add package PeyrSharp.Core --version
NuGet\Install-Package PeyrSharp.Core -Version
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="PeyrSharp.Core" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PeyrSharp.Core --version
#r "nuget: PeyrSharp.Core,"
#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.
// Install PeyrSharp.Core as a Cake Addin
#addin nuget:?package=PeyrSharp.Core&version=

// Install PeyrSharp.Core as a Cake Tool
#tool nuget:?package=PeyrSharp.Core&version=

Using PeyrSharp GitHub contributors GitHub issues GitHub GitHub release (latest SemVer) Nuget


A C# library designed to make developers' job easier.

View documentation » · Report Bug · Request Feature


The roots

In March 2020, we published LeoCorpLibrary, which was also a C# library that contains useful methods. When we started the development of it, we didn't know where the project will go yet. Over the releases, we've added more and more methods and new features. However, the meaning and the purpose of LeoCorpLibrary was becoming less clear for everyone; it was becoming a mess. This is why we decided to rather not release v5, but instead, we decided to make a brand new .NET Library, PeyrSharp.

Our next product

PeyrSharp is a C# written library designed to make developers' life easier. We've all written code that we wish we hadn't. PeyrSharp is here to respond to this need; by implementing useful methods in various domains: Mathematics, Web/HTTP requests, unit converters, extensions, environment-related operations, and more!


PeyrSharp is divided in multiple packages:

PeyrSharp, the main package, that contains all of the followings:

PeyrSharp.Core, the basic methods and features of C#

  • Maths
  • Password
  • Guid
  • Converters
  • Internet
  • Crypt

PeyrSharp.Env, methods related to the file system and to the current execution environment.

  • FileSys
  • Logger
  • Update
  • System

PeyrSharp.Enums, all enumerations used by PeyrSharp

  • WindowsVersion
  • TimeUnits
  • SystemThemes
  • OperatingSystems
  • StorageUnits
  • ControlAlignment
  • PasswordPresets
  • PasswordStrength

PeyrSharp.Exceptions, all exceptions used by PeyrSharp

  • RGBInvalidValueException
  • HEXInvalidValueException
  • InvalidGuidLengthException

PeyrSharp.Extensions, extension methods, that extends basic types, such as string, int, double or arrays (T[]).

  • String
  • Int
  • Double
  • Array (T[])

PeyrSharp.UiHelpers, methods related to Windows Forms or to the Windows Presentation Framework (WPF).

  • WinForms
  • Screen
  • WPF



Some modules of PeyrSharp are targeting features only available in specific operating systems. Thus, some packages aren't available on all platforms.

Package/Platform Windows macOS Linux + others
Env ⚠️ ⚠️


  • ✅ Full Support
  • ⚠️ Partial Support
  • ❌ Unsupported platform


PeyrSharp is available in the following frameworks

  • .NET 5
  • .NET 6
  • .NET 7 (soon)

Note: .NET Framework and .NET Core are not targeted by PeyrSharp, since they are no longer supported.



There are two branches:

Name Release Description
main GitHub release (latest by date) Stable versions
vNext GitHub release (latest by date including pre-releases) Next version of PeyrSharp (unstable)

Note: Other branches can also - of course - exists.


Here's what you'll need to contribute to this project:

  • Visual Studio 2022 with:
    • .NET Desktop Development
    • Git
  • .NET
    • .NET 5 (SDK + runtime)
    • .NET 6 (SDK + runtime)
    • .NET 7 (SDK + runtime)
  • (optional) NuGet


![Using PeyrSharp](


Project under the MIT license.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on PeyrSharp.Core:

Package Downloads

A C# library designed to make developers' job easier.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated 171 3/5/2023 46 3/5/2023 47 3/4/2023 206 2/5/2023 49 2/5/2023 46 2/4/2023 306 1/8/2023 55 1/8/2023 54 1/7/2023 418 12/4/2022 61 12/4/2022 58 12/3/2022 422 11/3/2022 61 11/2/2022 67 10/25/2022 72 10/21/2022 58 10/8/2022

- Added `CaloriesToJoules()` method (#79)
- Added `JoulesToCalories()` method (#79)
- Added `KnotsToKilometersPerHour()` method (#80)
- Added `KilometersPerHourToKnots()` method (#80)
- Added `KnotsToMilesPerHour()` method (#81)
- Added `MilesPerHourToKnots()` method (#81)
- Added `KilometersPerHourToMetersPerSecond()` method (#82)
- Added `MetersPerSecondToKilometersPerHour()` method (#82)
- Added `MilesPerHourToKilometersPerHour()` (#83)
- Added `KilometersPerHourToMilesPerHour()` (#83)