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. why we using properties

why we using properties

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

    why we using properties

    O M D P 4 Replies Last reply
    0
    • I indiaone

      why we using properties

      O Offline
      O Offline
      originSH
      wrote on last edited by
      #2

      Because coding outside means getting wet :P (well it does in this country anyway)

      I 1 Reply Last reply
      0
      • O originSH

        Because coding outside means getting wet :P (well it does in this country anyway)

        I Offline
        I Offline
        indiaone
        wrote on last edited by
        #3

        can you explain i m new to this

        O 1 Reply Last reply
        0
        • I indiaone

          why we using properties

          M Offline
          M Offline
          Martin 0
          wrote on last edited by
          #4

          Hello,

          asif_aslam wrote:

          why we using properties

          As this question is not very clever asked, you will only get useless answers. So try to make a full question, like: Why should we use properties instead of methods (getmethod and setmethod)? Or is it something else you meant? All the best, Martin

          1 Reply Last reply
          0
          • I indiaone

            can you explain i m new to this

            O Offline
            O Offline
            originSH
            wrote on last edited by
            #5

            One of the definitions of Property is: a piece of land or real estate I gave a reply in the manor the question was asked which was; lacking context and with minimal effort spent. In simple terms, when asking a question try to give as much detail as you can and put a bit of effort into it to show that you have atleast tried to find the answer on google or whatever your favorite search engine is.

            M 1 Reply Last reply
            0
            • I indiaone

              why we using properties

              D Offline
              D Offline
              DavidNohejl
              wrote on last edited by
              #6

              Think about properties as about smart fields. They can do checks for correct input, work with some cache etc... Under the hood, properties are just "syntactic sugar", language feature allowing two methods with get value/ set value sematics look like a field.


              "Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe

              1 Reply Last reply
              0
              • O originSH

                One of the definitions of Property is: a piece of land or real estate I gave a reply in the manor the question was asked which was; lacking context and with minimal effort spent. In simple terms, when asking a question try to give as much detail as you can and put a bit of effort into it to show that you have atleast tried to find the answer on google or whatever your favorite search engine is.

                M Offline
                M Offline
                Martin 0
                wrote on last edited by
                #7

                Nice, that you explain it! Got my '5'

                O 1 Reply Last reply
                0
                • M Martin 0

                  Nice, that you explain it! Got my '5'

                  O Offline
                  O Offline
                  originSH
                  wrote on last edited by
                  #8

                  :)

                  M 1 Reply Last reply
                  0
                  • O originSH

                    :)

                    M Offline
                    M Offline
                    Martin 0
                    wrote on last edited by
                    #9

                    Looks like someone has no humor!

                    1 Reply Last reply
                    0
                    • I indiaone

                      why we using properties

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

                      Because we Americans (well, United Statesians, no offense intended toward our neighbors) tend to be rabid possessive consumers. -- modified at 15:19 Thursday 21st June, 2007 Oh, and... Because we're not pinko commies!

                      M 1 Reply Last reply
                      0
                      • P PIEBALDconsult

                        Because we Americans (well, United Statesians, no offense intended toward our neighbors) tend to be rabid possessive consumers. -- modified at 15:19 Thursday 21st June, 2007 Oh, and... Because we're not pinko commies!

                        M Offline
                        M Offline
                        Martin 0
                        wrote on last edited by
                        #11

                        I must admit that my english (or maybe slang) is too bad to understand that. But I'm curious, and would like to get the joke (I guess). I also know that it might not be funny any more, if you have to explain it with other words, but give it a try please. All the best, Martin

                        P 1 Reply Last reply
                        0
                        • M Martin 0

                          I must admit that my english (or maybe slang) is too bad to understand that. But I'm curious, and would like to get the joke (I guess). I also know that it might not be funny any more, if you have to explain it with other words, but give it a try please. All the best, Martin

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

                          Which part?

                          M 1 Reply Last reply
                          0
                          • P PIEBALDconsult

                            Which part?

                            M Offline
                            M Offline
                            Martin 0
                            wrote on last edited by
                            #13

                            string TextIDidNotUnderstand = YourText.Remove("Because we"); :-D I would really need a conversion of the whole text I think! Thanks Martin

                            P 1 Reply Last reply
                            0
                            • M Martin 0

                              string TextIDidNotUnderstand = YourText.Remove("Because we"); :-D I would really need a conversion of the whole text I think! Thanks Martin

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

                              Not worth the trouble... move along... move along...

                              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