SemanticVersion Constructors

Definition

Overloads

SemanticVersion(Int32)

Construct a SemanticVersion.

SemanticVersion(String)

Construct a SemanticVersion from a string.

SemanticVersion(Version)

Construct a SemanticVersion from a Version, copying the NoteProperty storing the label if the expected property exists.

SemanticVersion(Int32, Int32)

Construct a SemanticVersion.

SemanticVersion(Int32, Int32, Int32)

Construct a SemanticVersion.

SemanticVersion(Int32, Int32, Int32, String)
SemanticVersion(Int32, Int32, Int32, String, String)

Construct a SemanticVersion.

SemanticVersion(Int32)

Construct a SemanticVersion.

C++
public:
 SemanticVersion(int major);

Parameters

major
Int32

The major version.

Exceptions

If major is less than 0.

Applies to

PowerShell SDK 7.4.0 and other versions
Product Versions
PowerShell SDK 7.2.0, 7.3.0, 7.4.0

SemanticVersion(String)

Construct a SemanticVersion from a string.

C++
public:
 SemanticVersion(System::String ^ version);

Parameters

version
String

The version to parse.

Exceptions

Applies to

PowerShell SDK 7.4.0 and other versions
Product Versions
PowerShell SDK 7.2.0, 7.3.0, 7.4.0

SemanticVersion(Version)

Construct a SemanticVersion from a Version, copying the NoteProperty storing the label if the expected property exists.

C++
public:
 SemanticVersion(Version ^ version);

Parameters

version
Version

The version.

Exceptions

If version is null.

If version.Revision.Revision is more than 0.

Applies to

PowerShell SDK 7.4.0 and other versions
Product Versions
PowerShell SDK 7.2.0, 7.3.0, 7.4.0

SemanticVersion(Int32, Int32)

Construct a SemanticVersion.

C++
public:
 SemanticVersion(int major, int minor);

Parameters

major
Int32

The major version.

minor
Int32

The minor version.

Exceptions

If major or minor is less than 0.

Applies to

PowerShell SDK 7.4.0 and other versions
Product Versions
PowerShell SDK 7.2.0, 7.3.0, 7.4.0

SemanticVersion(Int32, Int32, Int32)

Construct a SemanticVersion.

C++
public:
 SemanticVersion(int major, int minor, int patch);

Parameters

major
Int32

The major version.

minor
Int32

The minor version.

patch
Int32

The minor version.

Exceptions

If major, minor, or patch is less than 0.

Applies to

PowerShell SDK 7.4.0 and other versions
Product Versions
PowerShell SDK 7.2.0, 7.3.0, 7.4.0

SemanticVersion(Int32, Int32, Int32, String)

C++
public:
 SemanticVersion(int major, int minor, int patch, System::String ^ label);

Parameters

major
Int32
minor
Int32
patch
Int32
label
String

Applies to

PowerShell SDK 7.4.0 and other versions
Product Versions
PowerShell SDK 7.2.0, 7.3.0, 7.4.0

SemanticVersion(Int32, Int32, Int32, String, String)

Construct a SemanticVersion.

C++
public:
 SemanticVersion(int major, int minor, int patch, System::String ^ preReleaseLabel, System::String ^ buildLabel);

Parameters

major
Int32

The major version.

minor
Int32

The minor version.

patch
Int32

The patch version.

preReleaseLabel
String

The pre-release label for the version.

buildLabel
String

The build metadata for the version.

Exceptions

If preReleaseLabel don't match 'LabelUnitRegEx'. If buildLabel don't match 'LabelUnitRegEx'.

Applies to

PowerShell SDK 7.4.0 and other versions
Product Versions
PowerShell SDK 7.2.0, 7.3.0, 7.4.0