mirror of
https://github.com/m-lamonaca/dev-notes.git
synced 2025-04-08 11:56:41 +00:00
fix(c#): remove field
keywork
This commit is contained in:
parent
afa2321103
commit
a0dc9f51a3
1 changed files with 1 additions and 4 deletions
|
@ -1438,10 +1438,7 @@ class Class
|
||||||
set => _backingField = value;
|
set => _backingField = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// access backing field with the field keyword [C# 11?]
|
// REQUIRED PROPERTY prop must be set at obj init (in constructor or initializer)
|
||||||
public Type Property { get => field; set => field = value; }
|
|
||||||
|
|
||||||
// required property [C# 11?], prop must be set at obj init (in constructor or initializer)
|
|
||||||
public required Type Property { get; set; }
|
public required Type Property { get; set; }
|
||||||
|
|
||||||
// EXPRESSION-BODIED READ-ONLY PROPERTY
|
// EXPRESSION-BODIED READ-ONLY PROPERTY
|
||||||
|
|
Loading…
Add table
Reference in a new issue