tags:

views:

54

answers:

1

Hi,

Often i have a problem that I need to determine which assebmly to include into my project in order to use specific class. For instance I want to you TypeInfo class. MSDN does not say it belongs to. Actually I am not even been able to find TypeInfo class using MSDN document explorer search. All the results relate to some other stuff. For instance first result is about System.Runtime.Remoting.

Also MSDN says - assembly mscorlib. In the components page of Add Reference dialog box i can see mscorlib but also fully qualified names like System.RunTime.Serialization

What is the difference?

+6  A: 

MSDN absolutely does say which assembly it belongs to, at the top of the page, as well as the namespace. I'm not quite sure which TypeInfo class you're talking about in mscorlib though - this one is in Microsoft.Web.Management.DatabaseManager.dll. Did you mean PropertyInfo or something similar?

Things like System.Runtime.Serialization are still assemblies, but also namespaces. Many types live in an assembly with the same name as their namespace, but that's convention rather than a rule. MSDN tells you both.

For example, PropertyInfo is in the mscorlib assembly, but the System.Reflection namespace - as specified in the page linked earlier.

Jon Skeet