Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6139625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:00:49+00:00 2026-05-23T18:00:49+00:00

Some of the answers and comments to this question: Simplest C# code to poll

  • 0

Some of the answers and comments to this question: Simplest C# code to poll a property?, imply that retrieving data from a database in a property’s getter is Generally a Bad Idea.
Why is it so bad?

(If you have sources for your information, please mention them.)


I will usually be storing the information in a variable after the first “get” for reuse, if that influences your answer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:00:50+00:00Added an answer on May 23, 2026 at 6:00 pm

    Because retrieving data from a database could cause any number of exceptions, and property getters, as a rule, should never throw exceptions.

    The expected behavior of a property getter is just to return a value; if it’s actually doing a lot more than that, it should be a method.

    Microsoft’s guide for Property Design explains the reasons:
    https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/property

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Based on some answers to this question it appears that +alloc does some behind-the-scenes
This is a question I asked on another forum which received some decent answers,
I have a question that has been viewed, but with no answers or comments
After reading a couple of answers and comments on some SQL questions here, and
Some of the answers to a question I had about redirect_to made me think
When I read some of the answers on here I notice that some people
I have read some posts about this topic and the answers are comet, reverse
some comments here have confused me! I thought I knew this and god knows
I'm testing some code that needs to use FileInfo and DirectoryInfo object and, instead
I am needing help populating data from a database into a custom ListView. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.