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 791925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:54:48+00:00 2026-05-14T21:54:48+00:00

I was just thinking about it and since .Net has introduced properties is there

  • 0

I was just thinking about it and since .Net has introduced properties is there ever a situation where you would want to leave your code as a method that returns a value as opposed to a readonly property.

  • 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-14T21:54:49+00:00Added an answer on May 14, 2026 at 9:54 pm

    No. I’d recommend taking a look at Microsoft’s Property Usage Guidlines:

    Class library designers often must
    decide between implementing a class
    member as a property or a method. In
    general, methods represent actions and
    properties represent data. Use the
    following guidelines to help you
    choose between these options.

    • Use a property when the member is a logical data member. In the following
      member declarations, Name is a
      property because it is a logical
      member of the class.
    • Use a method when:
      • The operation is a conversion, such as Object.ToString.
      • The operation is expensive enough that you want to communicate to the
        user that they should consider caching
        the result.
      • Obtaining a property value using the get accessor would have an
        observable side effect.
      • Calling the member twice in succession produces different results.
      • The order of execution is important. Note that a type’s
        properties should be able to be set
        and retrieved in any order.
      • The member is static but returns a value that can be changed.
      • The member returns an array. Properties that return arrays can be
        very misleading. Usually it is
        necessary to return a copy of the
        internal array so that the user cannot
        change internal state. This, coupled
        with the fact that a user can easily
        assume it is an indexed property,
        leads to inefficient code. In the
        following code example, each call to
        the Methods property creates a copy of
        the array. As a result, 2n+1 copies of
        the array will be created in the
        following loop.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Without thinking about it at all I just want to say I should allow
Maybe I'm just thinking about this too hard, but I'm having a problem figuring
I just started thinking about creating/customizing a web crawler today, and know very little
I don't want to know how... Just how complicated.... I'm thinking of securing a
I'm just reading Code Complete by Steve McConell and I'm thinking of an Example
I'm used to thinking of member functions as just being a special case of
I'm thinking about making a networked game. I'm a little new to this, and
I am making my own base controller since I want to pass some data
Since learning about Linq and gaining experience in it, I find myself leaning on
I've just added yet another 3rd-party component to my .net project that contains a

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.