Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,24 +197,23 @@ You can take this a step further and use the `ManagerType` and associated `Bonus
```csharp
public class Manager
{
private ManagerType _managerType { get; set; }
private EmployeeType _managerType = EmployeeType.Manager;
public string Type
{
get => _managerType.Name;
set
{
if (!ManagerType.TryFromName(value, true, out var parsed))
if (!EmployeeType.TryFromName(value, true, out var parsed))
{
throw new Exception($"Invalid manager type of '{value}'");
}
_managerType = parsed;
}
}

public string BonusSize
public decimal BonusSize
{
get => _managerType.BonusSize();
set => _bonusSize_ = value;
get => _managerType.BonusSize;
}
}
```
Expand Down