int ComponentVersion { get; set; }

robot_2Generated
code_blocksInput

Description

The ComponentVersion property represents the version of the component. It is utilized by the JsonUpgrader to manage component upgrades and ensure compatibility across different versions of the component.

Usage

Use the ComponentVersion property to retrieve or set the version number of a component. This is particularly useful when you need to handle version-specific logic or when performing serialization and deserialization operations that depend on the component's version.

Example

// Example of accessing the ComponentVersion property
public class MyComponent : Component
{
    public void CheckVersion()
    {
        int version = this.ComponentVersion;
        if (version < 2)
        {
            // Perform upgrade logic
        }
    }
}