[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

C# Syntax Question

Posted on 2014-03-21
2
Medium Priority
?
297 Views
Last Modified: 2014-03-21
In doing some code review I have encountered something I'm not familiar with:

namespace test
{
[I1ActiveReport("/Reports/..., ReportAccess.userAccount, "Description"]
   public class Name : I1ActiveReport
   {
      ...
   }
}

And then again in a different example, inside a property:

protected className I1Parameters
{
[System.Diagnostics.DebuggerStepThrough]
   get
   {
       ...
    }
}

What do those brackets [  ]   do?
0
Comment
Question by:pzozulka
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 1000 total points
ID: 39946485
It's an attribute. Attributes are kind of like meta-programming. They have a variety of uses, and are more of an advanced topic--at least creating them is.
0
 
LVL 64

Assisted Solution

by:Fernando Soto
Fernando Soto earned 1000 total points
ID: 39946486
Hi pzozulka;

They are attributes associated with a class, property function and so on and during execution can be accessed using reflections. Please see MS Documentation.

Attributes (C# and Visual Basic)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question