how to identify the namespace dependency

  • Thread starter Thread starter amitnicks
  • Start date Start date
A

amitnicks

Hi,

I want to know that is there is a way to identify the Namespace
dependency for a particular types method. Like how to know
programittacly that SqlClient is in System.Data namespace?

Thanks in advance.

Nicks
 
Let's see your problem :
1.if you want to know the namespace of a type ( for example
SqlConnection)
you can use :
SqlConntection conn=new SqlConnection();
MessageBox.Show(conn.GetType().FullName);

this's name includes namespace + className

2. if you want to extract namespce tree structure , it depends on your
projects refrences.

Best Regards,
A.Hadi
 
Dear Hadi,

Thanks for your reply.

I just want to use Help.showHelp, but I didn't know which import
statement to use.

So programitally, can I get the namespace?

Regards,
Amit Mahajan
 
Hi Amit
You can use :
1.MSDN Doucmentation
2.Object Browser ( if you use visual studio .net )
3. my sample code in prev post

Regards,
A.Hadi
 
Back
Top