Try Mentor AI โ€” Free Pilot! Get instant, personalized help while you learn. Be among the first to explore it and shape what comes next. JOIN NOW

๐Ÿค‘ Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! ๐Ÿš€start learning today!

๐ŸŒŸ Dreaming of a bright future? ๐ŸŽ“ Ask about the Treehouse Scholarship program! ๐Ÿš€

โœจ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
      • • Vibe Coding
  • Philipp Rรคse
    PLUS
    Philipp Rรคse
    Courses Plus Student 11,347 Points

    Using different getter/setter appearance. Just a question of style or has it a relevant influence?

    Posted July 2, 2023 8:28pm by Philipp Rรคse
    Philipp Rรคse
    Courses Plus Student 11,347 Points
    • C#
    • C# Objects
    • Encapsulation with Properties
    • Accessor Methods

    1 Answer

  • Ra Bha
    Ra Bha
    2,201 Points

    Why does the instructor change the name of the field Location to _location when the field changes to private?

    Posted November 17, 2020 4:06pm by Ra Bha
    Ra Bha
    2,201 Points
    • C#
    • C# Objects
    • Encapsulation with Properties
    • Accessor Methods

    2 Answers

  • AbderRahman Ezzeldin
    AbderRahman Ezzeldin
    1,066 Points

    i dont understand the getter here why does it have to return and where is it returning ?

    Posted August 7, 2018 10:42pm by AbderRahman Ezzeldin
    AbderRahman Ezzeldin
    1,066 Points
    • C#
    • C# Objects
    • Encapsulation with Properties
    • Accessor Methods

    1 Answer

  • Mark Ramos
    Mark Ramos
    19,209 Points

    Should all fields be private going forward?

    Posted July 3, 2018 7:20pm by Mark Ramos
    Mark Ramos
    19,209 Points
    • C#
    • C# Objects
    • Encapsulation with Properties
    • Accessor Methods

    1 Answer

  • LESTER POLICARPIO
    LESTER POLICARPIO
    2,139 Points

    private MapLocation _location;

    Posted May 9, 2017 10:38am by LESTER POLICARPIO
    LESTER POLICARPIO
    2,139 Points
    • C#
    • C# Objects
    • Encapsulation with Properties
    • Accessor Methods

    1 Answer

  • Thanitsak Leuangsupornpong
    Thanitsak Leuangsupornpong
    7,490 Points

    Confuse about naming parameter in Setter that use word value.

    Posted March 26, 2017 5:57am by Thanitsak Leuangsupornpong
    Thanitsak Leuangsupornpong
    7,490 Points
    • C#
    • C# Objects
    • Encapsulation with Properties
    • Accessor Methods

    2 Answers

  • Stijn Van Wijmeersch
    Stijn Van Wijmeersch
    5,663 Points

    Return a boolean when using more complex setters?

    Posted November 14, 2016 8:06pm by Stijn Van Wijmeersch
    Stijn Van Wijmeersch
    5,663 Points
    • C#
    • C# Objects
    • Encapsulation with Properties
    • Accessor Methods

    2 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.