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. What is the difference between static,readonly and constant ?

What is the difference between static,readonly and constant ?

Scheduled Pinned Locked Moved C#
question
6 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.
  • M Offline
    M Offline
    md_azy
    wrote on last edited by
    #1

    Hi , What is the difference between static,readonly and constant Thanks and advance, Azeez.

    L P 2 Replies Last reply
    0
    • M md_azy

      Hi , What is the difference between static,readonly and constant Thanks and advance, Azeez.

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

      constant is constant static is static readonly is readonly. Honestly, wikipedia isn't available in your native tongue? Or is the first chapter of your book to difficult...

      Check out the CodeProject forum Guidelines[^] The original soapbox 1.0 is back![^]

      A D 2 Replies Last reply
      0
      • L Lost User

        constant is constant static is static readonly is readonly. Honestly, wikipedia isn't available in your native tongue? Or is the first chapter of your book to difficult...

        Check out the CodeProject forum Guidelines[^] The original soapbox 1.0 is back![^]

        A Offline
        A Offline
        Abhinav S
        wrote on last edited by
        #3

        There are pleny of links available on the internet. Here - try this one [^].

        There's nothing left in my right brain and nothing right in my left brain.

        1 Reply Last reply
        0
        • L Lost User

          constant is constant static is static readonly is readonly. Honestly, wikipedia isn't available in your native tongue? Or is the first chapter of your book to difficult...

          Check out the CodeProject forum Guidelines[^] The original soapbox 1.0 is back![^]

          D Offline
          D Offline
          dan sh
          wrote on last edited by
          #4

          EliottA wrote:

          Honestly, wikipedia isn't available in your native tongue?

          :omg: Don't you trust MSDN?

          50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!

          A 1 Reply Last reply
          0
          • D dan sh

            EliottA wrote:

            Honestly, wikipedia isn't available in your native tongue?

            :omg: Don't you trust MSDN?

            50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!

            A Offline
            A Offline
            Abhinav S
            wrote on last edited by
            #5

            d@nish wrote:

            Don't you trust MSDN?

            Never a good sign, it it ? ;)

            There's nothing left in my right brain and nothing right in my left brain.

            1 Reply Last reply
            0
            • M md_azy

              Hi , What is the difference between static,readonly and constant Thanks and advance, Azeez.

              P Offline
              P Offline
              puri keemti
              wrote on last edited by
              #6

              Static : - Which shared the value with multiple instance Readonly :- once define.. you can change the value through constructor only at the time of creating instance.. Constant :- once define; you can't change it,,

              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