Dela via


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.

public:
 SemanticVersion(int major);
public:
 SemanticVersion(int major);
 SemanticVersion(int major);
public SemanticVersion (int major);
new System.Management.Automation.SemanticVersion : int -> System.Management.Automation.SemanticVersion
Public Sub New (major As Integer)

Parameters

major
Int32

The major version.

Exceptions

If major is less than 0.

Applies to

SemanticVersion(String)

Construct a SemanticVersion from a string.

public:
 SemanticVersion(System::String ^ version);
public:
 SemanticVersion(Platform::String ^ version);
 SemanticVersion(std::wstring const & version);
public SemanticVersion (string version);
new System.Management.Automation.SemanticVersion : string -> System.Management.Automation.SemanticVersion
Public Sub New (version As String)

Parameters

version
String

The version to parse.

Exceptions

Applies to

SemanticVersion(Version)

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

public:
 SemanticVersion(Version ^ version);
public SemanticVersion (Version version);
new System.Management.Automation.SemanticVersion : Version -> System.Management.Automation.SemanticVersion
Public Sub New (version As Version)

Parameters

version
Version

The version.

Exceptions

If version is null.

If version.Revision.Revision is more than 0.

Applies to

SemanticVersion(Int32, Int32)

Construct a SemanticVersion.

public:
 SemanticVersion(int major, int minor);
public:
 SemanticVersion(int major, int minor);
 SemanticVersion(int major, int minor);
public SemanticVersion (int major, int minor);
new System.Management.Automation.SemanticVersion : int * int -> System.Management.Automation.SemanticVersion
Public Sub New (major As Integer, minor As Integer)

Parameters

major
Int32

The major version.

minor
Int32

The minor version.

Exceptions

If major or minor is less than 0.

Applies to

SemanticVersion(Int32, Int32, Int32)

Construct a SemanticVersion.

public:
 SemanticVersion(int major, int minor, int patch);
public:
 SemanticVersion(int major, int minor, int patch);
 SemanticVersion(int major, int minor, int patch);
public SemanticVersion (int major, int minor, int patch);
new System.Management.Automation.SemanticVersion : int * int * int -> System.Management.Automation.SemanticVersion
Public Sub New (major As Integer, minor As Integer, patch As Integer)

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

SemanticVersion(Int32, Int32, Int32, String)

public:
 SemanticVersion(int major, int minor, int patch, System::String ^ label);
public:
 SemanticVersion(int major, int minor, int patch, Platform::String ^ label);
 SemanticVersion(int major, int minor, int patch, std::wstring const & label);
public SemanticVersion (int major, int minor, int patch, string label);
new System.Management.Automation.SemanticVersion : int * int * int * string -> System.Management.Automation.SemanticVersion
Public Sub New (major As Integer, minor As Integer, patch As Integer, label As String)

Parameters

major
Int32
minor
Int32
patch
Int32
label
String

Applies to

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

Construct a SemanticVersion.

public:
 SemanticVersion(int major, int minor, int patch, System::String ^ preReleaseLabel, System::String ^ buildLabel);
public:
 SemanticVersion(int major, int minor, int patch, Platform::String ^ preReleaseLabel, Platform::String ^ buildLabel);
 SemanticVersion(int major, int minor, int patch, std::wstring const & preReleaseLabel, std::wstring const & buildLabel);
public SemanticVersion (int major, int minor, int patch, string preReleaseLabel, string buildLabel);
new System.Management.Automation.SemanticVersion : int * int * int * string * string -> System.Management.Automation.SemanticVersion
Public Sub New (major As Integer, minor As Integer, patch As Integer, preReleaseLabel As String, buildLabel As String)

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