mx-pl.ExtendedTypes
1.0.0
See the version list below for details.
dotnet add package mx-pl.ExtendedTypes --version 1.0.0
NuGet\Install-Package mx-pl.ExtendedTypes -Version 1.0.0
<PackageReference Include="mx-pl.ExtendedTypes" Version="1.0.0" />
<PackageVersion Include="mx-pl.ExtendedTypes" Version="1.0.0" />
<PackageReference Include="mx-pl.ExtendedTypes" />
paket add mx-pl.ExtendedTypes --version 1.0.0
#r "nuget: mx-pl.ExtendedTypes, 1.0.0"
#:package mx-pl.ExtendedTypes@1.0.0
#addin nuget:?package=mx-pl.ExtendedTypes&version=1.0.0
#tool nuget:?package=mx-pl.ExtendedTypes&version=1.0.0
About This Project
A small C#/.NET library providing data type based utility methods—mainly for improved readability.
Motivation
Side-stepping the negation operator
Even though the negation operator (!) is concise, it is also easy to miss and sometimes has to be put in places where it obstructs or does not align with the natural reading flow.
This library aims to provide extension methods which improve the readability and straightforwardness of such statements—and in some cases there conciseness, too.
Features
Boolean
This package provides a straightforward way to toggle (ie negate the value of) a boolean variable.
// Let's define a bool variable and set it to true.
var myBool = true;
Toggle()
The extension method Toggle() negates the value of the instance without returning anything.
// Value of 'myBool' is 'true'.
myBool.Toggle();
// Value of 'myBool' is 'false'.
Toggled()
The extension method Toggled() returns the negated value but does not change the variable itself.
// Value of 'myBool' is 'true'.
var result = myBool.Toggled();
// Value of 'myBool' is still 'true'.
// Value of 'result' is 'false'.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.