Shortening full qualifier

  • Thread starter Thread starter Robert Bravery
  • Start date Start date
R

Robert Bravery

HI all,

I am using:

using System.Text;
using Microsoft.Office.Interop.Excel;

But both have a datatable
Whenever I want to initialise a variable of datatable, I have be more
precise as to which one I want. HAving to use the full qualifier anyway of
at least one of them. Is there away to overcome this.


Thanks
Robert
 
Robert Bravery said:
using System.Text;
using Microsoft.Office.Interop.Excel;

But both have a datatable

I expect you mean "System.Data".
Whenever I want to initialise a variable of datatable, I have be more
precise as to which one I want. HAving to use the full qualifier anyway of
at least one of them. Is there away to overcome this.

You can use an alias:

using Foo = System.Data.DataTable;

-- Barry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top