[ ] blocks over classes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ozgur develioglu

    #1

    [ ] blocks over classes

    Hi,

    What serves [ ] blocks just over the class declarations. They like:

    [Transaction(Tra nsactionOption. NotSupported)]
    public class MyObject:DALObj ect
    {....

    I'm dealing with C# for nearly a year but I coudn't find any information
    about this. Can you send me a reference please?

    Ozgur.


  • Rob Tillie

    #2
    Re: [ ] blocks over classes

    In addition to the comments above,
    attributes are used to provide "metadata".
    Like in the example you gave, it just says: Hey Runtime, this entire class
    doesn't support transactions!

    Hope it helps,
    -- Rob.

    ozgur develioglu wrote:[color=blue]
    > Hi,
    >
    > What serves [ ] blocks just over the class declarations. They like:
    >
    > [Transaction(Tra nsactionOption. NotSupported)]
    > public class MyObject:DALObj ect
    > {....
    >
    > I'm dealing with C# for nearly a year but I coudn't find any
    > information about this. Can you send me a reference please?
    >
    > Ozgur.[/color]


    Comment

    Working...