79088389

Date: 2024-10-15 04:28:22
Score: 1.5
Natty:
Report link

The feature almost made it to C#13. Moved probably to C#14:

https://devblogs.microsoft.com/dotnet/dotnet-build-2024-announcements/#extension-types

public implicit extension PersonExtension for Person
{
    public bool IsLead
        => this.Organization
            .Teams
            .Any(team => team.Lead == this);
}

This property would be called as:

if (person.IsLead) { ... }
Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: walter33