Understand the limitations of using records with Vogen
mainIf you choose to use record instead of class or struct, be aware of the following implementation differences in the generated code:
Valueproperty accessibility: For records, the generatedValueproperty usesinitaccessibility to support C#withexpressions (e.g.,var vo2 = vo1 with { Value = 42 }). However, usingwithto change the value does not correctly trigger the internal 'initialized' state of the object. While the Vogen analyzer will still catch this and cause a compilation error, it is technically inconsistent with the intended lifecycle.ToStringimplementation: Vogen explicitly overridesToStringfor classes and structs to avoid the default record behavior (which enumerates all fields). For records, Vogen still performs this override to ensure the output remains controlled.