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. C#
  4. parameter name from params

parameter name from params

Scheduled Pinned Locked Moved C#
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.
  • R Offline
    R Offline
    Rbledwards
    wrote on last edited by
    #1

    When using params is it posible to get the name of the parameter passed or only the value? Params is useful when you are not sure of the number of parameters, but if I'm not sure of the number, how can I be sure enough to blindly say: FirstName = paramList[0]; LastName = paramList[1]; Thanks, Robert

    R 1 Reply Last reply
    0
    • R Rbledwards

      When using params is it posible to get the name of the parameter passed or only the value? Params is useful when you are not sure of the number of parameters, but if I'm not sure of the number, how can I be sure enough to blindly say: FirstName = paramList[0]; LastName = paramList[1]; Thanks, Robert

      R Offline
      R Offline
      Rbledwards
      wrote on last edited by
      #2

      Nevermind, I just spent 5 hours over-thinking the simplest thing. I'm always trying to use a ray gun. Robert

      D 1 Reply Last reply
      0
      • R Rbledwards

        Nevermind, I just spent 5 hours over-thinking the simplest thing. I'm always trying to use a ray gun. Robert

        D Offline
        D Offline
        David Stone
        wrote on last edited by
        #3

        Rbledwards wrote: I just spent 5 hours over-thinking the simplest thing. I'm always trying to use a ray gun. Don't you hate that? And then the overwhelming feeling of "How stupid can I be?" when you see that there really is an easier way to do it... I once spent an entire day trying to rewrite something that was already in the .NET framework...that was depressing...


        youd ebtter bnot be taki8ng agvantage o f my mental abilites!1 -David Wulff one night over MSN while totally plastered

        J 1 Reply Last reply
        0
        • D David Stone

          Rbledwards wrote: I just spent 5 hours over-thinking the simplest thing. I'm always trying to use a ray gun. Don't you hate that? And then the overwhelming feeling of "How stupid can I be?" when you see that there really is an easier way to do it... I once spent an entire day trying to rewrite something that was already in the .NET framework...that was depressing...


          youd ebtter bnot be taki8ng agvantage o f my mental abilites!1 -David Wulff one night over MSN while totally plastered

          J Offline
          J Offline
          J Dunlap
          wrote on last edited by
          #4

          Twice recently I've tried all kinds of things to get something to work, only to find out that I forgot to convert a numeric value to double before comparing. You'd think I'd learn...

          "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
          "You must be the change you wish to see in the world." - Mahatma Gandhi

          N 1 Reply Last reply
          0
          • J J Dunlap

            Twice recently I've tried all kinds of things to get something to work, only to find out that I forgot to convert a numeric value to double before comparing. You'd think I'd learn...

            "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
            "You must be the change you wish to see in the world." - Mahatma Gandhi

            N Offline
            N Offline
            Nick Seng
            wrote on last edited by
            #5

            jdunlap wrote: You'd think I'd learn... [humble] It's what makes us human.....[humble] :rolleyes: Nick Seng (the programmer formerly known as Notorious SMC)


            God, I pity me! - Phoncible P. Bone

            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