Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

In .NET SDK documentation, Tables i 1

Status
Not open for further replies.

emeraldtea

Programmer
Mar 4, 2003
16
US
In .NET SDK documentation, Tables is a property of DataSet. It lists as:
public DataTableCollection Tables {get;}

What does {get;} mean? Is it related to a method for getting Tables value?

What is DataTableCollection? Is it a base class that Tables inherited?

Thanks.
:->
 
The DataSet represents a complete set of data including related tables, constraints, and relationships among the tables.
If you wan to access one particular table named Tab1 in DataSet ds, you need to access it as follows
ds.Tables["Tab1"]

Check ut following links for more info
It is like a memory resident relational Database.
for more info refer:-


Hope this helps :)
 
thanks.
I am interested in finding out the syntax of the C#.

public DataTableCollection Tables {get;}


Tables is not a method. What does the {get;} mean?


 
The {get} indicates that it's a read-only property.

You would access it by doing something like:
Code:
DataTableCollection MyTables = MyDataset.Tables;
MyTables will then be a collection of DataTable objects from your DataSet.

If the property had been writable (like the Prefix property off the DataSet object), then it would have been defined like:
Code:
[Serializable]
public string Prefix {get; set;}

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top