Reputation: 131
I was wondering why we need to specify using System.Reflection separately from using System while making use of methods in class Type. Is Reflection a nested namespace, inside System namespace?
Upvotes: 1
Views: 97
Reputation: 4275
Using System namespace does not include all child namespaces.
Here, System.Reflection is a child namespace of System.So you have to import it explicitly by using directive.
Note:Same principle applies to all namespace in c# for example System and System.IO and many more.
Upvotes: 1
Reputation: 11740
Yes, System.Reflection is a namespace inside the System namespace. https://msdn.microsoft.com/en-us/library/mt481557(v=vs.110).aspx
Upvotes: 2