GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / IGoIdentifiablePart Interface / PartID Property
In This Topic
    PartID Property (IGoIdentifiablePart)
    In This Topic
    Gets or sets the unique ID of this part in its document, a non-negative integer.
    Syntax
    int PartID {get; set;}

    Property Value

    This value is invalid unless this GoObject is part of a GoDocument whose GoDocument.MaintainsPartID property is true. This property should not be set when this object is part of a document. The initial value should be -1, which instructs the document, when the object is added to the document, to find a unique ID and assign it to this object.
    Remarks
    When GoDocument.MaintainsPartID is false, you may set and get this PartIDproperty. However, you will need to manage any uniqueness of values, and (if desired) you will need to manage a hashtable to make finding parts fast. GoDocument will not set any PartID unless GoDocument.MaintainsPartID is true or unless you call GoDocument.EnsureUniquePartID.
    See Also