CodiceFiscale 2.0.2
dotnet add package CodiceFiscale --version 2.0.2
NuGet\Install-Package CodiceFiscale -Version 2.0.2
<PackageReference Include="CodiceFiscale" Version="2.0.2" />
<PackageVersion Include="CodiceFiscale" Version="2.0.2" />
<PackageReference Include="CodiceFiscale" />
paket add CodiceFiscale --version 2.0.2
#r "nuget: CodiceFiscale, 2.0.2"
#:package CodiceFiscale@2.0.2
#addin nuget:?package=CodiceFiscale&version=2.0.2
#tool nuget:?package=CodiceFiscale&version=2.0.2
CodiceFiscale
A .NET Core library to calculate and validate the Italian Tax Code (Codice Fiscale)
Table of Contents
Description
The CodiceFiscale library provides an easy-to-use interface for generating and validating the Italian Tax Code based on personal data such as name, surname, date of birth, and city of birth.
It is designed for .NET developers who need to work with the Italian Tax Code in applications like tax management, user registration, and government service integrations.
Installation
You can install the CodiceFiscale library via NuGet Package Manager:
dotnet add package CodiceFiscale --version X.X.X
Or by adding the following to your .csproj:
<PackageReference Include="CodiceFiscale" Version="X.X.X" />
Once installed, restore the packages:
dotnet restore
Usage
Here’s a few examples of how to use the library:
Generate a Codice Fiscale
using CodiceFiscaleLib.Helpers;
string result =
.Encode("Rossi", "Mario", 'M', new DateTime (1980, 5, 20), "Milano");
Console.WriteLine($"Generated Codice Fiscale: {result}");
Decode a Codice Fiscale
using CodiceFiscaleLib.Helpers;
// decode
var decoded = DecodingHelper.Decode(code);
// get the dictionary
var decodedDict = (Dictionary<string, string>)decoded["raw"];
// access the value
string firstName = decodedDict["firstname"];
Console.WriteLine($"Decoded Codice Fiscale First Name: {firstName}");
Validate a Codice Fiscale
using CodiceFiscaleLib.Helpers;
bool isValid = DecodingHelper.IsValid("RSSMRA80E20F205I");
Console.WriteLine($"Is valid Codice Fiscale: {isValid}");
Contributing
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository
- Create a new branch (git checkout -b feature/your-feature)
- Commit your changes (git commit -am 'Add new feature')
- Push the branch (git push origin feature/your-feature)
- Open a Pull Request
Please ensure all pull requests pass the existing tests and include new tests for any added functionality
License
This project is licensed under the MIT License. See the LICENSE file for more details
Acknowledgments
Special thanks to all contributors and resources that made this project possible
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. 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 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.2
- System.Text.Json (>= 8.0.5)
-
.NETStandard 2.0
- System.Text.Json (>= 8.0.5)
-
net8.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.