dso
dso

Reputation: 9580

Where to look up names of .NET assemblies that contain a class or namespace?

In .NET scripting languages such as PowerShell and IronPython, when you want to use a .NET class you typically need to import the assembly name. Is there a quick way to find this information?

E.g. if I want to use System.Net.Mail, how do I quickly find out which assembly its in? I'm not necessarily looking for a programmatic way, even an online reference will do. The MSDN .NET class reference doesn't seem to tell you this (e.g. System.Net.Mail)

I only care about standard .NET classes, obviously there is no standard namespace/class to assembly mapping for custom and 3rd party classes.

Upvotes: 1

Views: 139

Answers (2)

ParmesanCodice
ParmesanCodice

Reputation: 5035

Red Gate's .NET Reflector is also a quick way to check.

Upvotes: 5

Fredrik Mörk
Fredrik Mörk

Reputation: 158319

MSDN does contain this information. If you check the documentation page for a class (such as System.Net.Mail.Attachment) it lists the namespace and assembly name at the top of the page, right under the class name headline.

Upvotes: 6

Related Questions