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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:33:19+00:00 2026-05-12T05:33:19+00:00

I always come to a halt when creating classes. I’m fairly intermediate to architecture

  • 0

I always come to a halt when creating classes. I’m fairly intermediate to architecture so bear with me. Here’s my dilemma. I come to a point eventually in a class where I have to ask myself, “Does this method need parameters when I can just get what I need from the class’s property or private backing field?”.

Now for public methods, obviously you should most likely have parameters because someone’s going to be consuming your class and using these methods whether they’re in an instance class or static class. That debate is not about public methods because that is obvious to me. That if you have a public method(s) inside your class, even though lets say you can get one of the values you need from a property or private field in that class instead of requiring a param to that method and using the param, you should still require params and use the params or at least don’t count them out when you can specify some params. At least this is how I view public methods because who knows how someone else might use that method and they need to know what needs to be passed and they need to pass the actual data to the method as they are outside your class.

The issue comes when for example I’m creating and using private methods or something of that sort. Lets say I create a custom control (.cs). Its job is to run a bunch of methods that I’ve broken out the logic for this control and create some strings of HTML to output to the browser. Well, I create a property that is public so that whoever is using this control can feed it a certain object. And that certain object is what half of the methods in my class use to help generate that HTML. Because it’s a property, any of the methods in my custom class can use it. So it completely bypasses any need to create parameters in some of those methods because I can just get it form the property. But then I get to a point where I’m creating an awful lot of parameterless methods because I’m getting objects from the backing fields or combination of backing fields and properties. Or I might be just getting them from a few propewhen I am able to get what I need other ways inside this class? But then something says to you no, that’s bad man, you do need parameters once in a while dude…at least a combo of parameters and using some backing fields or properties in your method, etc. but don’t always discount parameters even if those params might be some internals passed to it (fields or properties). But then again if I’m gonna be passing internals as params where’s the fine line between just accessing and using those fields or properties not through the method as params but directly inside the method itself.

But that bothers me because then I question why I need method parameters in cases where I can get the value elsewhere.

Can someone explain the fine line here and help me come to a conclusion on the line between using a lot of backing fields in your methods or properties rather than some params you specify in the methods..even though some of those params may still be passed a value from a backing field or property when another method calls it?

I hope this makes any inkling of sense but I can’t be the only one who comes across this dilemma. Maybe I’m the only one who thinks about this sh** and I over think I don’t know. But the main problem I have personally with OOP is that there are so many damn ways to get what you need (constructor, property, backing field, method).

  • 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-12T05:33:20+00:00Added an answer on May 12, 2026 at 5:33 am

    less coffee, fewer words 😉

    to summarize

    when to use parameters in methods?

    short answer

    when the information needed is not available already in the object, in accordance with the Don’t Repeat Yourself principle

    parameterless methods are fine, there’s no need to tell an object something that it already knows

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

Sidebar

Ask A Question

Stats

  • Questions 239k
  • Answers 239k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer In order to install the web templates you have two… May 13, 2026 at 6:55 am
  • Editorial Team
    Editorial Team added an answer You'll be needing MAC address, SSID, and signal strength of… May 13, 2026 at 6:55 am
  • Editorial Team
    Editorial Team added an answer If you have the address of the linear framebuffer all… May 13, 2026 at 6:55 am

Related Questions

I always come to a halt when creating classes. I'm fairly intermediate to architecture
I have a project in mind, here's the pitch. When I come to a
I've been working on a layout for a site recently and have gotten stuck
I have a good friend (my old college roommate, actually), who critiques my personal
I always have trouble designing the user interface when it come to manage a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.