MixedReadOnlyWriteOnly.cs 409 B

123456789101112
  1. using Godot;
  2. public partial class MixedReadOnlyWriteOnly : GodotObject
  3. {
  4. public readonly string ReadOnlyField = "foo";
  5. public string ReadOnlyAutoProperty { get; } = "foo";
  6. public string ReadOnlyProperty { get => "foo"; }
  7. public string InitOnlyAutoProperty { get; init; }
  8. bool _writeOnlyBackingField = false;
  9. public bool WriteOnlyProperty { set => _writeOnlyBackingField = value; }
  10. }