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 piece of code which looks like this: jQuery(function($) { $('#saySomething').click(function()
I came across this code while working through code-analysis warnings on our code base.
I came across a few articles like this one , which suggest that some
Came across some code today that had a javascript array, made in php, using
Came across a problem which google searches could not help me with. I have
Came across this code: <?php require_once 'HTTP/Session/Container/DB.php'; $s = new HTTP_Session_Container_DB('mysql://user:password@localhost/db'); ini_get('session.auto_start') or session_start();
I came across this Linq to Sql code in an application I am maintaining:
I came across this due to a bug in my code and I'm curious
I came across the below lines in code unsigned char A = 0xB9; unsigned
I came across the following code : int i; for(; scanf(%s, &i);) printf(hello); As

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.