MixedReadOnlyWriteOnly.cs 483 B

12345678910111213
  1. namespace Godot.SourceGenerators.Sample
  2. {
  3. public partial class MixedReadonlyWriteOnly : GodotObject
  4. {
  5. public readonly string ReadOnlyField = "foo";
  6. public string ReadOnlyAutoProperty { get; } = "foo";
  7. public string ReadOnlyProperty { get => "foo"; }
  8. public string InitOnlyAutoProperty { get; init; }
  9. private bool _writeOnlyBackingField = false;
  10. public bool WriteOnlyProperty { set => _writeOnlyBackingField = value; }
  11. }
  12. }