Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Properties, Parameters, Fields

Properties, Parameters, Fields

Scheduled Pinned Locked Moved The Lounge
question
14 Posts 9 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M michaelbarb

    I was talking about C#

    So many years of programming I have forgotten more languages than I know.

    P Offline
    P Offline
    PIEBALDconsult
    wrote on last edited by
    #4

    Then you have more studying to do. Members - C# Programming Guide | Microsoft Docs[^] You'll notice that "Parameters" is not on that list -- parameters are not members.

    M 1 Reply Last reply
    0
    • P PIEBALDconsult

      Then you have more studying to do. Members - C# Programming Guide | Microsoft Docs[^] You'll notice that "Parameters" is not on that list -- parameters are not members.

      M Offline
      M Offline
      michaelbarb
      wrote on last edited by
      #5

      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.

      N 1 Reply Last reply
      0
      • M michaelbarb

        I was talking about C#

        So many years of programming I have forgotten more languages than I know.

        F Offline
        F Offline
        Forogar
        wrote on last edited by
        #6

        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.

        1 Reply Last reply
        0
        • M michaelbarb

          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.

          N Offline
          N Offline
          Nelek
          wrote on last edited by
          #7

          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.

          1 Reply Last reply
          0
          • M michaelbarb

            These three words get tossed around randomly at times. Often interchangeably. I get really confused by some articles To me they have three different definitions. Here is my take, what is yours. 1. A Property can be either a Parameter or Field. 2. Parameters have get and set. 3. Fields are declared and that is it. Mostly simple atomics but can be instances of enums or lists or etc. I know this may be oversimplified this is gist of it.

            So many years of programming I have forgotten more languages than I know.

            W Offline
            W Offline
            Wizard of Sleeves
            wrote on last edited by
            #8

            And then there's arguments...

            Nothing succeeds like a budgie without teeth.

            Richard DeemingR 1 Reply Last reply
            0
            • W Wizard of Sleeves

              And then there's arguments...

              Nothing succeeds like a budgie without teeth.

              Richard DeemingR Offline
              Richard DeemingR Offline
              Richard Deeming
              wrote on last edited by
              #9

              Is that the five minute argument, or the full half-hour? :-D


              "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

              "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

              1 Reply Last reply
              0
              • M michaelbarb

                These three words get tossed around randomly at times. Often interchangeably. I get really confused by some articles To me they have three different definitions. Here is my take, what is yours. 1. A Property can be either a Parameter or Field. 2. Parameters have get and set. 3. Fields are declared and that is it. Mostly simple atomics but can be instances of enums or lists or etc. I know this may be oversimplified this is gist of it.

                So many years of programming I have forgotten more languages than I know.

                M Offline
                M Offline
                Member 9167057
                wrote on last edited by
                #10

                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.

                1 Reply Last reply
                0
                • M michaelbarb

                  These three words get tossed around randomly at times. Often interchangeably. I get really confused by some articles To me they have three different definitions. Here is my take, what is yours. 1. A Property can be either a Parameter or Field. 2. Parameters have get and set. 3. Fields are declared and that is it. Mostly simple atomics but can be instances of enums or lists or etc. I know this may be oversimplified this is gist of it.

                  So many years of programming I have forgotten more languages than I know.

                  B Offline
                  B Offline
                  BillWoodruff
                  wrote on last edited by
                  #11

                  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

                  M 1 Reply Last reply
                  0
                  • B BillWoodruff

                    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

                    M Offline
                    M Offline
                    michaelbarb
                    wrote on last edited by
                    #12

                    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.

                    1 Reply Last reply
                    0
                    • M michaelbarb

                      These three words get tossed around randomly at times. Often interchangeably. I get really confused by some articles To me they have three different definitions. Here is my take, what is yours. 1. A Property can be either a Parameter or Field. 2. Parameters have get and set. 3. Fields are declared and that is it. Mostly simple atomics but can be instances of enums or lists or etc. I know this may be oversimplified this is gist of it.

                      So many years of programming I have forgotten more languages than I know.

                      H Offline
                      H Offline
                      HotN
                      wrote on last edited by
                      #13

                      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?

                      M 1 Reply Last reply
                      0
                      • H HotN

                        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?

                        M Offline
                        M Offline
                        michaelbarb
                        wrote on last edited by
                        #14

                        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.

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups