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. General Programming
  3. Design and Architecture
  4. Parameters and arguments.

Parameters and arguments.

Scheduled Pinned Locked Moved Design and Architecture
question
5 Posts 4 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.
  • T Offline
    T Offline
    TimoKinnunen
    wrote on last edited by
    #1

    These are arguments: static void Main(string[] args) {}. Inside a class a function is a method and not a function. But I see often that those arguments are called parameters. Why? We call a method with parameters and not with arguments. Inside the method parameters become arguments, Isn't that true?

    L F 2 Replies Last reply
    0
    • T TimoKinnunen

      These are arguments: static void Main(string[] args) {}. Inside a class a function is a method and not a function. But I see often that those arguments are called parameters. Why? We call a method with parameters and not with arguments. Inside the method parameters become arguments, Isn't that true?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Quote:

      When a parameter is passed to the method, it is called an argument.

      [C# Method Parameters](https://www.w3schools.com/cs/cs\_method\_parameters.asp)

      It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

      Greg UtasG 1 Reply Last reply
      0
      • L Lost User

        Quote:

        When a parameter is passed to the method, it is called an argument.

        [C# Method Parameters](https://www.w3schools.com/cs/cs\_method\_parameters.asp)

        It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

        Greg UtasG Offline
        Greg UtasG Offline
        Greg Utas
        wrote on last edited by
        #3

        I had to look it up for C++ to discover that it uses the same terminology. I've often used them interchangeably and wasn't sure if there was actually a distinction. So thanks for teaching me something today.

        Robust Services Core | Software Techniques for Lemmings | Articles
        The fox knows many things, but the hedgehog knows one big thing.

        <p><a href="https://github.com/GregUtas/robust-services-core/blob/master/README.md">Robust Services Core</a>
        <em>The fox knows many things, but the hedgehog knows one big thing.</em></p>

        L 1 Reply Last reply
        0
        • Greg UtasG Greg Utas

          I had to look it up for C++ to discover that it uses the same terminology. I've often used them interchangeably and wasn't sure if there was actually a distinction. So thanks for teaching me something today.

          Robust Services Core | Software Techniques for Lemmings | Articles
          The fox knows many things, but the hedgehog knows one big thing.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Thanks for the kudos!

          It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

          1 Reply Last reply
          0
          • T TimoKinnunen

            These are arguments: static void Main(string[] args) {}. Inside a class a function is a method and not a function. But I see often that those arguments are called parameters. Why? We call a method with parameters and not with arguments. Inside the method parameters become arguments, Isn't that true?

            F Offline
            F Offline
            franchoo
            wrote on last edited by
            #5

            The variables defined in the method (A.K.A. function) signature, are known as parameters of the method, the data passed to those variables when call upon are the arguments... Difference Between Argument and Parameter | Compare the Difference Between Similar Terms[^] In the static Main method we define a String array named args because when an app is generated, and after, executed with arguments, there it will be where those program arguments will be set into! :java:

            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