|
It may depend on the language in use, but what you list is not entirely correct for C#.
Edit:
1. A Property can be either a Parameter or Field. -- No, a Property may or may not be backed by a field, but has nothing to do with parameters
2. Parameters have get and set. -- No, that's Properties.
3. Fields are declared and that is it. Mostly simple atomics but can be instances of enums or lists or etc. -- Sorta, but a field may be any type. (Though there may be restrictions I'm not thinking of right now.)
modified 17-Aug-21 14:39pm.
|
|
|
|
|
I was talking about C#
So many years of programming I have forgotten more languages than I know.
|
|
|
|
|
|
This mostly comes from Microsoft's website and not the books on C#. There are some discrepancies.
So many years of programming I have forgotten more languages than I know.
|
|
|
|
|
What books?
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I would tell you where you are wrong but it would be better for you to look it up in an authoritative work.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
And then there's arguments...
Nothing succeeds like a budgie without teeth.
|
|
|
|
|
Is that the five minute argument, or the full half-hour?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Coming from C#, parameters don't exist (the way you describe them). There's fields & properties with properties having getters/setters and fields being just member variables.
I personally use fields as much as possible (KISS principle), but switch to properties if needed, i.e. when I need a private setter and a public getter or override getters in derived classes.
The difference is more on the syntactic side of things. Semantically, both properties & fields are variables-this-object-exposes and whatever the object does with those variables, that's the object's own business.
|
|
|
|
|
Please read the Lounge posting guidelines, and post technical question in an appropriate forum.
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
It is not meant to be a technical argument. It is just general usage of ambiguous terms. After all, no semicolons were harmed by it.
So many years of programming I have forgotten more languages than I know.
|
|
|
|
|
As shown by others, this is not correct for C#. But it did bring one question to mind.
When talking about a method signature, what are the inputs given to the method considered to be? Parameters or arguments? Those are the two most common that come to my mind, though I can think of others.
Are parameters and arguments just completely synonymous? Does it matter how they're being used? Maybe describing the definition of the method compared to describing being executed at runtime? What are they called when using one as a value or reference within the method? Or do they just just turn into "variable" at that point and the original term is meaningless?
I've thought about this too much now while writing this and can only contradict my own thoughts now. Does anyone have a clear way of thinking about this case?
|
|
|
|
|
Arguments is an old term that is not used much any more. You still find arguments in many references. Parameters is the newer term for the same thing.
This is where words get confusing. When you use get/set many consider it a kind of super argument/parameter. That is why many references consider things with get/set use the term parameters.
My whole point in this rant is no one is right or wrong. They are not terms with rigid meanings cast in syntax stone. They are all just general concepts.
So many years of programming I have forgotten more languages than I know.
|
|
|
|
|
Nanci Griffith[^]
A wonderful singer/songwriter, a lovely, distinctive voice, and had a ear for other great songwriters (she turned me on to several), damn.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
sad, what is the cause?
diligent hands rule....
|
|
|
|
|
I'm not sure, it wasn't publicized, but I know she's battled cancer couple of times in the past.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
I have an old tablet--a BlackBerry Playbook--that I've stopped using a good while ago. The hardware still works great, it's the software loaded on it that's pretty much been abandoned.
I thought I found a good use for it - my router has a page showing a (near) real-time bandwidth usage graph, which I find to be very handy to keep an eye on what's going on. Loading that page on a tablet sitting on my desk, and just letting it run all day, would mean I don't have to dedicate space on one of the monitors hooked up to my main system--and not getting buried under other windows. It's always there and available. The page isn't so sophisticated that the tablet's ancient browser has any problem rendering it.
However BlackBerry, in its infinite wisdom, has decided that the timeout value for the tablet to go to sleep maxes out at not 12 hours, not an hour, not 30 minutes...but 5 minutes. With no option to disable it altogether. That means the monitor is shown for 5 minutes, hard max, and then the tablet goes to sleep.
It's a simple job. The tablet, despite being ancient, is more than capable of handling it. But because someone decided it was a good idea to force the tablet to go to sleep after 5 minutes - even when plugged in - I can't even assign it that task.
|
|
|
|
|
|
Some good suggestions in there for sure, thanks for that. Unfortunately, I'm not gonna be writing code, so #2 is out. I'm not sure how I would use #3. Host a file with that code on a web server running somewhere, and load it in a separate browser tab?
That leaves #1. Some ideas there sounded promising, but so far, they all failed.
Maybe I should just get Homer's keyboard duck to tap on the display every few seconds...
|
|
|
|
|
Is it a touch screen?
If yes,
Get a string, something like a crazy ball that will be recognized as a touch, and a small fan.
Hang the ball on the screen and point the fan at it.
Don’t stare at it too long or you might be hypnotized.
|
|
|
|
|
Is a bee just a bear with no ears?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Hive no idea what you're talking about.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
From what I hear, the buzz is that's a real honey of a pun - had to think twice.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
modified 17-Aug-21 11:43am.
|
|
|
|
|
'ear, 'ear!
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
I REALLY hope not! I've just started bee keeping and gotten my first hive (seriously).
I'd hate to see bears coming out of it, and without ears, they wouldn't be able to hear me yell "Noooooo, please don't eat me!"
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain
|
|
|
|