Question about "[" - "]" mark

Hi all,

When I am reading this article :

http://asp.net/learn/dataaccess/tutorial02cs.aspx?tabid=63

I found most of its class methods are under some "[" and "]" mark. For example :

[CODE]
// What the meaning of this one line below?
[System.ComponentModel.DataObject]
public
class ProductsBLL
{


// And also one line below?
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
public Northwind.ProductsDataTable GetProducts()
{
return Adapter.GetProducts();
}
[/CODE]

I don't understand what is this "[System.ComponentModel.DataObject]" used for? (and also the ones at the top of getProducts() method)

Is there any tutorial for this "[aCharacter]" ?
0
yonscun_lie 6/27/2006 3:10:44 AM
📁 asp.net.getting-started
📃 92001 articles.
⭐ 1 followers.

💬 1 Replies
👁️‍🗨️ 11 Views

Hi,

it's an attribute, more specifically a DataObjectAttribute.

According to the documentation on MSDN: Use the DataObjectAttribute attribute to identify an object as suitable for use by an ObjectDataSource object. Design-time classes such as the ObjectDataSourceDesigner class use the DataObjectAttribute attribute to present suitable objects to bind to an ObjectDataSource object.

Grz, Kris.


Read my blog. Handy Firefox plugins for web developers.


Workaround for non working Mark as answer buttons.
0
XIII 6/27/2006 5:42:53 AM
Reply:
Similar Posts: