0
[System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]
    public static string[] myfunc(string a)
    {
          // do stuff
    }

What does the stuff inside the [] do or used for?

psj01
  • 2,723
  • 5
  • 25
  • 56

1 Answers1

3

This is an attribute. Generally speaking,

Attributes provide a powerful method of associating declarative information with C# code (types, methods, properties, and so forth). Once associated with a program entity, the attribute can be queried at run time and used in any number of ways.

For further information on this, please have a look here.

Christos
  • 52,021
  • 8
  • 71
  • 105