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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:10:28+00:00 2026-05-11T06:10:28+00:00

I came across a recent Audit report in our company for the code we

  • 0

I came across a recent Audit report in our company for the code we maintain which says that we should not use Get in the method (not properties) naming like in GetSearchResults or GetXyzInformation. I looked up the MS guidelines (http://msdn.microsoft.com/en-us/library/4df752aw(VS.71).aspx) for method naming and as per that Get is allowed, so what are your thoughts on this, Can we have it or not from a standard perspective, if not why?

Additional Info
I am adding more information after the first set of answers, the Methods that i am referring to are the kind which involves a database interaction, so clearly properties are not ideal options.

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-11T06:10:29+00:00Added an answer on May 11, 2026 at 6:10 am

    It is perfectly legal (it is even legal to write methods of the form ‘get_Foo’ which would collide with the compiler synthesized get method if you were to declare a property Foo with a getter).

    As to Whether it is a good thing:

    1. If the method does serious work, has side effect or may throw an exception is it probable that it is not a good candidate for a property and the name is descriptive so should not be changed needlessly
    2. If the method does no serious work making it a property is probably a good thing since it will make it easier to work with in calling code.
    3. if the method does not actually ‘Get’ anything the name is bad and should be changed

    The above points are subjective but the reason that hard rules like ‘never’ ‘always’ can be a bad idea is that the balancing of multiple subjective and competing factors is part of what being a good developer is all about.

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

Sidebar

Related Questions

I came across a controller in an older set of code (Rails 1.2.3) that
I came across the function InterlockedExchange and was wondering when I should use this
I came across this syntax which i have not seen before struct A {
I came across some Java code that had the following structure: public MyParameterizedFunction(String param1,
I came across the web (don't recall where) a note that says that MS
Came across a problem which google searches could not help me with. I have
I came across an odd bug in my code that revealed an interesting behavior
I came across code written by somebody which caught some exception and tried logging
I came across a printed article by Bertrand Meyer where he states that tests
I came across this snippet of code on MSDN: entityBuilder.Metadata = @res://*/AdventureWorksModel.csdl| res://*/AdventureWorksModel.ssdl| res://*/AdventureWorksModel.msl;

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.