?
Solved

C# Syntax Question

Posted on 2014-03-21
2
Medium Priority
?
289 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 63

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

777 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