© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
20 replies
Decoherence

❔ picking the right patterns

class Human{
  public int age { /*custom get n set*/ }
}

Human h = new Human();
h.age++;
class Human{
  public int age { /*custom get n set*/ }
}

Human h = new Human();
h.age++;

vs

class Human{
  public int age { get; protected set; }
  public grow() { age++; }
}

Human h = new Human();
h.grow();
class Human{
  public int age { get; protected set; }
  public grow() { age++; }
}

Human h = new Human();
h.grow();
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

✅ .NET resolver picking the wrong runtime
C#CC# / help
2w ago
WPF Design patterns
C#CC# / help
16mo ago
✅ Disjunctive patterns negation
C#CC# / help
2y ago
❔ ✅ c# uml patterns
C#CC# / help
3y ago