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. Is it static, or is it dynamic? Nobody knows, it's Particle Man!

Is it static, or is it dynamic? Nobody knows, it's Particle Man!

Scheduled Pinned Locked Moved The Lounge
csharpquestion
7 Posts 5 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.
  • E Offline
    E Offline
    ekolis
    wrote on last edited by
    #1

    So apparently this is a valid method signature in C#:

    static dynamic GetMyData()

    (Yes, I know what static and dynamic mean in C#, I just thought it was funny... ;P )

    P G B 3 Replies Last reply
    0
    • E ekolis

      So apparently this is a valid method signature in C#:

      static dynamic GetMyData()

      (Yes, I know what static and dynamic mean in C#, I just thought it was funny... ;P )

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

      Any kid will tell you that static is dynamic.

      E 1 Reply Last reply
      0
      • P PIEBALDconsult

        Any kid will tell you that static is dynamic.

        E Offline
        E Offline
        ekolis
        wrote on last edited by
        #3

        No they won't - TV's haven't had static for several years now! Just "no signal" :(

        A 1 Reply Last reply
        0
        • E ekolis

          No they won't - TV's haven't had static for several years now! Just "no signal" :(

          A Offline
          A Offline
          Anthony Mushrow
          wrote on last edited by
          #4

          I expect it's on more than you think[^].

          -SK Genius

          Vehicle Simulation Demo - New and Improved!

          E 1 Reply Last reply
          0
          • E ekolis

            So apparently this is a valid method signature in C#:

            static dynamic GetMyData()

            (Yes, I know what static and dynamic mean in C#, I just thought it was funny... ;P )

            G Offline
            G Offline
            Gary R Wheeler
            wrote on last edited by
            #5

            #define Schrodinger static dynamic

            There. You're done.

            Software Zen: delete this;

            1 Reply Last reply
            0
            • A Anthony Mushrow

              I expect it's on more than you think[^].

              -SK Genius

              Vehicle Simulation Demo - New and Improved!

              E Offline
              E Offline
              ekolis
              wrote on last edited by
              #6

              That show is STILL around? Wow, I remember it from when I was a teenager...

              1 Reply Last reply
              0
              • E ekolis

                So apparently this is a valid method signature in C#:

                static dynamic GetMyData()

                (Yes, I know what static and dynamic mean in C#, I just thought it was funny... ;P )

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

                Truly strange, because in order to actually write a compilable version of this you are going to have write something like:

                // note: tested only in new Visual Studio 2012 RC, in a WinForms C# Project
                static dynamic GetMyData()
                {
                // note: also compiles if you just declare 'dyn as an 'int
                // note: won't compile if 'dyn has no value assigned: assigning null to 'dyn will work.
                // note: "return null;" as the only content in the method body also compiles
                dynamic dyn = 100;

                return dyn;
                

                }

                It baffles me to try and imagine a use case for this ! best, Bill

                "The greatest mystery is not that we have been flung at random between the profusion of matter and of the stars, but that within this prison we can draw from ourselves images powerful enough to deny our nothingness." Andre Malraux

                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