TJC.VersionExtensions 0.1.2

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

NuGet Version and Downloads count

Increments

Version.Increment(VersionComponents)

  • Returns a new Version with the specified component incremented by 1, and the following components reset to 0

Version.IncrementMajor()

  • Returns a new Version with the major component incremented by 1, and the rest reset to 0
var version = new Version(1, 2, 3, 4);
var incrementedVersion = version.IncrementMajor();
// incrementedVersion == new Version(2, 0, 0, 0)

Version.IncrementMinor()

  • Returns a new Version with the minor component incremented by 1, and the build & revision reset to 0
var version = new Version(1, 2, 3, 4);
var incrementedVersion = version.IncrementMinor();
// incrementedVersion == new Version(1, 3, 0, 0)

Version.IncrementBuild()

  • Returns a new Version with the build component incremented by 1, and the revision reset to 0
var version = new Version(1, 2, 3, 4);
var incrementedVersion = version.IncrementBuild();
// incrementedVersion == new Version(1, 2, 4, 0)

Version.IncrementRevision()

  • Returns a new Version with the revision component incremented by 1
var version = new Version(1, 2, 3, 4);
var incrementedVersion = version.IncrementRevision();
// incrementedVersion == new Version(1, 2, 3, 5)

Comparisons

Version.Equivalent(Version)

  • Returns true if the components are equivalent (if undefined, they are considered equivalent to 0), false otherwise
var version = new Version(1, 0, 0, 0);
var other = new Version(1);
var result = version.Equivalent(other);
// result == true

Version.IsZero()

  • Returns true if the components are equivalent (if undefined, they are considered equivalent to 0), false otherwise
var zero = new Version(0, 0, 0, 0);
var undefined = new Version();
var result1 = zero.IsZero();
var result2 = undefined.IsZero();
// result1 == true
// result2 == true
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

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
0.4.8 241 4/15/2025
0.4.7 130 1/3/2025
0.4.6 104 12/3/2024
0.4.5 97 12/3/2024
0.4.4 100 12/3/2024
0.4.3 113 11/15/2024
0.4.2 102 11/10/2024
0.4.1 99 11/5/2024
0.4.0 99 11/5/2024
0.3.1 114 10/26/2024
0.3.0 110 10/20/2024
0.2.2 121 10/20/2024
0.2.1 108 10/16/2024
0.2.0 108 10/10/2024
0.1.7 117 9/29/2024
0.1.6 120 9/5/2024
0.1.5 107 9/5/2024
0.1.4 109 9/4/2024
0.1.3 110 9/3/2024
0.1.2 117 7/20/2024
0.1.1 136 7/20/2024
0.1.0 112 7/20/2024