473,432 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,432 software developers and data experts.

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 1091
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: pembed2003 | last post by:
Hi all, I am reading the book "C How to Program" and in the chapter where it discuss scope rule, it says there are four scopes for a variable: function scope file scope block scope...
5
by: george r smith | last post by:
In the MSDN documentation there is a reference to "the global scope". For example "You can declare types directly in the global scope." I have search extensively and can not find a definition of...
4
by: NewsMS | last post by:
I'd like to know if static variables have thread scope or process scope. This means if the variable can be shared among threads on the same process or is available only to different class instances...
8
by: Adam | last post by:
I've seen lots of mentions of the scope of an "internal" class. What's the scope of an "internal" method. Why would one use it as opposed to an "internal" class? Thanks in advance. Adam
4
by: Gery D. Dorazio | last post by:
Gurus, If a static variable is defined in a class what is the scope of the variable resolved to for it to remain 'static'? For instance, lets say I create a class library assembly that is...
0
by: Erick Shuai | last post by:
In my project, I need to use custom attribute on all assemblies. This attribute will implement some non-functional code and I want to use it on assembly scope(AttributeTargets is Assembly). I...
6
by: mookid8000 | last post by:
Hi group! Is it possible to scan an assembly *which has NOT been added as a reference* for types, and dynamically create instances of the loaded types? I have a program, MyProgram.exe, which...
8
by: Born Bugler | last post by:
What I'm actually talking about is, when you put the same class in different assemblies, you get two different types. This is reasonable (if you would call it) in most cases as it avoids possible...
20
by: David | last post by:
I feel like an idiot asking this but here goes: I understand the 'concept' of scope and passing data by value and/or by reference but I am confused on some specifics. class example{ int i; //my...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.