468,249 Members | 1,594 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,249 developers. It's quick & easy.

scope of types in an assembly

Hi,
Is it true that the CLR does not see any namespaces but only the assembly
while executing? can i have two types which have the same name in different
namespaces inside the same assembly and still have my program work? this
wldnt be possible if the runtime doesnt see namespaces?
thanks
shikher
Nov 19 '05 #1
1 952
It's true the runtime doesn't use namespaces per se, but the runtime does
only use a type's full name, which includes the namespace.

For instance, the following lines:

Type t = typeof(Int32);
Console.WriteLine(t.FullName);

Would spit out:
System.Int32

Thus the runtime would know the difference between Namespace1.MyClass and
Namespace2.MyClass - they have different full names.

--
Scott
http://www.OdeToCode.com/blogs/scott/
Hi,
Is it true that the CLR does not see any namespaces but only the
assembly
while executing? can i have two types which have the same name in
different
namespaces inside the same assembly and still have my program work?
this
wldnt be possible if the runtime doesnt see namespaces?
thanks
shikher

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by pembed2003 | last post: by
5 posts views Thread by george r smith | last post: by
4 posts views Thread by NewsMS | last post: by
8 posts views Thread by Adam | last post: by
4 posts views Thread by Gery D. Dorazio | last post: by
reply views Thread by Erick Shuai | last post: by
8 posts views Thread by Born Bugler | last post: by
20 posts views Thread by David | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.