KP.ConverterLibrary
1.0.0
dotnet add package KP.ConverterLibrary --version 1.0.0
NuGet\Install-Package KP.ConverterLibrary -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="KP.ConverterLibrary" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add KP.ConverterLibrary --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: KP.ConverterLibrary, 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.
// Install KP.ConverterLibrary as a Cake Addin #addin nuget:?package=KP.ConverterLibrary&version=1.0.0 // Install KP.ConverterLibrary as a Cake Tool #tool nuget:?package=KP.ConverterLibrary&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
About
Useful numeric extensions created for teaching C# yet has many extensions that has real world application.
Numeric language extensions.
Int
Extension | Description |
---|---|
Invert | Flip negative to positive or positive to negative |
IntToDecimal | Convert int to decimal e.g. 25 will return .25 |
IsPositive | Determine if value is positive |
IsNegative | Determine if value is negative |
ToYesNoFormat | Convert int to Yes/No (not constrained to 0 0r 1) |
ToYesNo | Formats an int as Yes/No (must be 0 or 1) |
ToNullableInt | Convert a string to a Nullable int or null |
PercentDone | Provide percent completed formatted nnn% |
decimal
Extension | Description |
---|---|
CountDecimalPlaces | count decimals in the fraction part of a number |
GetParts | Get major and fraction parts of a double |
Invert | Flip negative to positive or positive to negative |
double
Extension | Description |
---|---|
PercentOf | Calculates percentage of a number |
String arrays to int arrays
Extension | Description |
---|---|
AllInt | Determine if all values can represent an int |
ToIntegerArray | Convert values in array to int array discards non int values in array. |
AsIntegerArray | |
GetNonIntegerIndexes | Get all non-integer positions/indices |
ToIntegerPreserveArray | Convert all values in array to int array where non int values will be set to the default value. |
NoZeros | Determine if all values are non-zero |
String arrays to double arrays
Extension | Description |
---|---|
AllDouble | Determine if all values can represent a double |
ToDoubleArray | Convert values in array to double array discards non double values in array. |
GetNonDoubleIndexes | Get all non-double positions/indices |
ToDoublePreserveArray | Convert all values in array to double array where non double values will be set to the default value. |
String arrays to decimal arrays
Extension | Description |
---|---|
AllDecimal | Determine if all values can represent a decimal |
ToDecimalArray | Convert values in array to decimal array discards non decimal values in array. |
GetNonDecimalIndexes | Get all non-decimal positions/indices |
ToDecimalPreserveArray | Convert all values in array to decimal array where non decimal values will be set to the default value. |
Int Sequence extensions
Extension | Description |
---|---|
IsSequenceBroken | Determine if the sequence has missing elements |
SequenceFindMissing | Get missing elements used with IsSequenceBroken |
TryParse
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net5.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.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 366 | 10/7/2021 |