Harness proD API Help
EPLAN.Harness.API.DataStructures Namespace / PartVersion Class / PartVersion Constructor / PartVersion Constructor(String)
Version number as a string.
Example
In This Topic
    PartVersion Constructor(String)
    In This Topic
    Create an PartVersion object by the string value. The input string must be in this format: <major>.<minor>.<revision> - "1.3.5" <major>.<minor> - "1.3" If the input is invalid the EPLAN.Harness.API.Exceptions.ArgumentException will be thrown.
    Syntax
    public PartVersion( 
       string version
    )

    Parameters

    version
    Version number as a string.
    Exceptions
    ExceptionDescription
    Argument is invalid. The exception is thrown when a wrong argument is passed to the method or the setter of property.
    Example
    A sample code of method using.
    PartVersion partVersion1 = new PartVersion("1.0.0");
    PartVersion partVersion2 = new PartVersion("1.0"); // This assignment is equivalent to previous declaration.
    PartVersion partVersion3 = new PartVersion("1.2.1");
    
    bool test1 = partVersion1.IsValid(); // --> true
    bool test2 = partVersion2.IsValid(); // --> true
    bool test3 = partVersion3.IsValid(); // --> true
    See Also