Take the 2-minute tour ×

I want to know how to create DataTable variable without explicitly referencing to the DataSet. For example I have this working example:

UsersDataSet.AddressDataTable address;

I would like to omit the UsersDataSet part, because It is being repeated numerous times in the code. I tried to define it with using:

using ManagingUsers.UsersDataSetTableAdapters;

But it still would not recognize AddressDataTable without UsersDataSet:

AddressDataTable address;

It says that the type or namespace name could not be found.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted
using AddressDataTable = UsersDataSet.AddressDataTable ;

should do the trick

More info on using here

share|improve this answer
Yes that is is. Just minor change, it has to be: using AddressDataTable = ManagingUsers.UsersDataSet.AddressDataTable; –  Jernej Jerin Dec 14 '11 at 11:10
add comment

Your Answer


