---
title: Format version string
summary: Return the current version state as a fixed four-part dot-delimited string.
status: draft
owner: SAIF Team
last_reviewed: 2026-07-30
library: SAIF.Framework.Version
reference_type: package
operation_id: OP-VER-002
trigger: Caller invokes Version.ToString()
---

# Format version string

This operation renders a `Version` instance's current state as the library's canonical `Major.Minor.Build.Revision` string. It is a pure read-and-format step: it does not parse, validate, or normalize the stored segment values before emitting them, so whatever text each property currently holds is what the caller receives.

| Field | Value |
| --- | --- |
| **Operation ID** | `OP-VER-002` |
| **Trigger** | Caller invokes `Version.ToString()` |
| **Inputs** | Current `Major`, `Minor`, `Build`, and `Revision` property values |
| **Outputs** | Dot-delimited `Major.Minor.Build.Revision` string |
| **Primary components** | `Version.ToString()` |
| **Entry point** | `SAIF.Framework.Version\Version.vb` |

## Steps

1. Read the instance's current `Major`, `Minor`, `Build`, and `Revision` property values.
2. Substitute those four values into the fixed template `"{0}.{1}.{2}.{3}"` using `String.Format`.
   - No normalization or validation is applied: each stored string is inserted exactly as-is, so any blank or non-numeric content carries through into the formatted result.
3. Return the formatted string to the caller.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([Caller invokes ToString]) --> Read[Read current segment values]
	Read --> Format[Substitute into Major.Minor.Build.Revision template]
	Format --> EndOk([Return formatted string])
```

## Failure and edge-case behavior

- There is no validation branch in this operation; it always emits the four stored segment strings, in order, regardless of their content.
- Because formatting never calls `Parse` or `ToInt`, a segment left blank or set to non-numeric text by an earlier operation remains visible, unaltered, in the output string.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

## Sources
- `SAIF.Framework.Version\Version.vb`
