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. Attributes in C#

Attributes in C#

Scheduled Pinned Locked Moved C#
csharptutorialquestion
11 Posts 6 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.
  • L Offline
    L Offline
    Loithuxua
    wrote on last edited by
    #1

    I don't known what does Attributes means and how to use it? Please show me the basic about it, thanks a lot!

    P A 2 Replies Last reply
    0
    • L Loithuxua

      I don't known what does Attributes means and how to use it? Please show me the basic about it, thanks a lot!

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      If only somebody would invent a mechanism to find information on this cluttered mess we call the internet. By golly, they'd make a fortune. I take it you're hoping that we have stumbled across some nugget of information that provides the answer. By randomly typing words into the browser address bar, I managed to find this page[^] in seconds. I must be some form of savant.

      Forgive your enemies - it messes with their heads

      My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

      K W 2 Replies Last reply
      0
      • P Pete OHanlon

        If only somebody would invent a mechanism to find information on this cluttered mess we call the internet. By golly, they'd make a fortune. I take it you're hoping that we have stumbled across some nugget of information that provides the answer. By randomly typing words into the browser address bar, I managed to find this page[^] in seconds. I must be some form of savant.

        Forgive your enemies - it messes with their heads

        My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

        K Offline
        K Offline
        Keith Barrow
        wrote on last edited by
        #3

        Now that's sarcasm.

        Sort of a cross between Lawrence of Arabia and Dilbert.[^]
        -Or-
        A Dead ringer for Kate Winslett[^]

        P N 2 Replies Last reply
        0
        • P Pete OHanlon

          If only somebody would invent a mechanism to find information on this cluttered mess we call the internet. By golly, they'd make a fortune. I take it you're hoping that we have stumbled across some nugget of information that provides the answer. By randomly typing words into the browser address bar, I managed to find this page[^] in seconds. I must be some form of savant.

          Forgive your enemies - it messes with their heads

          My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

          W Offline
          W Offline
          Wayne Gaylard
          wrote on last edited by
          #4

          Certainly no idiot, that's for sure:thumbsup:

          ...and I have extensive experience writing computer code, including OIC, BTW, BRB, IMHO, LMAO, ROFL, TTYL.....

          1 Reply Last reply
          0
          • K Keith Barrow

            Now that's sarcasm.

            Sort of a cross between Lawrence of Arabia and Dilbert.[^]
            -Or-
            A Dead ringer for Kate Winslett[^]

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #5

            I've tried to be nice for a long time, but the level of dross we're trawling through is getting to me. I guess I'm back to my old ways.

            Forgive your enemies - it messes with their heads

            My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

            K 1 Reply Last reply
            0
            • P Pete OHanlon

              I've tried to be nice for a long time, but the level of dross we're trawling through is getting to me. I guess I'm back to my old ways.

              Forgive your enemies - it messes with their heads

              My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

              K Offline
              K Offline
              Keith Barrow
              wrote on last edited by
              #6

              I know exactly what you mean, I've even been giving it a bit of a break recently. The quality of the questions has been low recently, and some claque-y voting for articles etc. The CP has been consistently been the best .net forum for the 10ish years I've been developing, but I'm not confident that will continue to be the case in the next few years unless things improve substantially & soon.

              Sort of a cross between Lawrence of Arabia and Dilbert.[^]
              -Or-
              A Dead ringer for Kate Winslett[^]

              1 Reply Last reply
              0
              • K Keith Barrow

                Now that's sarcasm.

                Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                -Or-
                A Dead ringer for Kate Winslett[^]

                N Offline
                N Offline
                Not Active
                wrote on last edited by
                #7

                I don't understand the word "sarcasm". Is there some place I can go to learn more?


                I know the language. I've read a book. - _Madmatt

                K P 2 Replies Last reply
                0
                • N Not Active

                  I don't understand the word "sarcasm". Is there some place I can go to learn more?


                  I know the language. I've read a book. - _Madmatt

                  K Offline
                  K Offline
                  Keith Barrow
                  wrote on last edited by
                  #8

                  This Internet thing: it showed me a whole new world that I never knew. [^] by Matt B. 31st of March, 2006

                  Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                  -Or-
                  A Dead ringer for Kate Winslett[^]

                  1 Reply Last reply
                  0
                  • N Not Active

                    I don't understand the word "sarcasm". Is there some place I can go to learn more?


                    I know the language. I've read a book. - _Madmatt

                    P Offline
                    P Offline
                    Pete OHanlon
                    wrote on last edited by
                    #9

                    Mark Nischalke wrote:

                    I don't understand the word "sarcasm". Is there some place I can go to learn more?

                    JSOP's house?

                    Forgive your enemies - it messes with their heads

                    My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

                    N 1 Reply Last reply
                    0
                    • P Pete OHanlon

                      Mark Nischalke wrote:

                      I don't understand the word "sarcasm". Is there some place I can go to learn more?

                      JSOP's house?

                      Forgive your enemies - it messes with their heads

                      My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

                      N Offline
                      N Offline
                      Not Active
                      wrote on last edited by
                      #10

                      I'm sure I could get several different calibre of answers there.


                      I know the language. I've read a book. - _Madmatt

                      1 Reply Last reply
                      0
                      • L Loithuxua

                        I don't known what does Attributes means and how to use it? Please show me the basic about it, thanks a lot!

                        A Offline
                        A Offline
                        ambarishtv
                        wrote on last edited by
                        #11

                        Attribute Developers can add metadata to their code through attributes. There are two types of attributes, custom and pseudo custom attributes, and to the developer these have the same syntax. Attributes in code are messages to the compiler to generate metadata. In CIL, metadata such as inheritance modifiers, scope modifiers, and almost anything that isn't either opcodes or streams, are also referred to as attributes. A custom attribute is a regular class that inherits from the Attribute class. Custom attributes are used by the .NET Framework extensively. Windows Communication Framework uses attributes to define service contracts, ASP.NET uses these to expose methods as web services, LINQ to SQL uses them to define the mapping of classes to the underlying relational schema, Visual Studio uses them to group together properties of an object, the class developer indicates the category for the object's class by applying the [Category] custom attribute. Custom attributes are interpreted by application code and not the CLR.When the compiler sees a custom attribute it will generate custom metadata that is not recognised by the CLR. The developer has to provide code to read the metadata and act on it. :thumbsup:

                        -ambarish-

                        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