Skip to content

Commit 4a3e9d1

Browse files
committed
Add another example in doc
1 parent 28031e4 commit 4a3e9d1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Documentation/Contributing/CodingGuidelines.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,22 @@ public float MyValue
440440
get => myValue;
441441
set => myValue = value;
442442
}
443+
444+
/// <summary>
445+
/// Getter/Setters not wrapping a value directly should contain documentation comments just as public functions would
446+
/// </summary>
447+
public float AbsMyValue
448+
{
449+
get
450+
{
451+
if (MyValue < 0)
452+
{
453+
return -MyValue;
454+
}
455+
456+
return MyValue
457+
}
458+
}
443459
```
444460

445461
### Cache values and serialize them in the scene/prefab whenever possible

0 commit comments

Comments
 (0)