473,507 Members | 5,060 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The difference between GetTypes() and GetExportedTypes() methods of the Assembly class.

Hi all,
An assembly is composed of a set of modules. An Assembly and a Module
classes have a GetTypes() methods. Moreover, an Assembly class has a
GetExportedTypes() method.
1. This means that if i use the GetTypes() of an Assembly class there's no
need to browse its modules and call their GetTypes() methods ?
2. The GetExportedTypes() method of an Assembly class returns only types
that an external client could call; and the GetTypes() method of an Assembly
class returns even types that are not allowed to be used of an external
client?
Correct me please.
and thanks in advance.
Abdessamad.
Nov 15 '05 #1
1 4299
Abdessamad,

See inline:

"Abdessamad Belangour" <be*******@irin.univ-nantes.fr> wrote in message
news:eX**************@TK2MSFTNGP12.phx.gbl...
Hi all,
An assembly is composed of a set of modules. An Assembly and a Module
classes have a GetTypes() methods. Moreover, an Assembly class has a
GetExportedTypes() method.
1. This means that if i use the GetTypes() of an Assembly class there's no
need to browse its modules and call their GetTypes() methods ?
Yes, this is right, it will give you the type information for all types
in all of the modules that make up the assembly.
2. The GetExportedTypes() method of an Assembly class returns only types
that an external client could call; and the GetTypes() method of an Assembly class returns even types that are not allowed to be used of an external
client?
Yes, this is correct as well. I don't know what the criteria are for
types to be returned, but I assume it is all public classes, as well as any
protected and protected internal classes.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
Correct me please.
and thanks in advance.
Abdessamad.

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
6934
by: John M. Gabriele | last post by:
I've done some C++ and Java in the past, and have recently learned a fair amount of Python. One thing I still really don't get though is the difference between class methods and instance methods. I...
0
1587
by: Stephane Belzile | last post by:
Hi, I have been trying for more than 3 days to load an assembly and execute a method from a specific class. Loading the assembly from the GAC using it's strong name works fine but when I try to...
2
1797
by: aerge calderara | last post by:
dear all, I am using the GetTypes method of an assembly object in order to check that it implement a particular needed interface for my application. ...
8
13289
by: Dot net work | last post by:
I need VB.NET's "shadows" functionality inside a C# project. I tried the "new" keyword, but it didn't seem to work, because my particular function does in fact differ in signature to the function...
1
15284
by: John Jenkins | last post by:
Hi, I have a fairly simeple question. What are the differences between Assembly.CreateInstance and System.Activator.CreateInstance? I had read that one maps to the other, however when I use...
33
3428
by: Joe Fallon | last post by:
1. I have a Base class that has a certain amount of functionality. 2. Then I have a CodeSmith generated class that inherits from the Base class and adds functionality. 3. Since I want to be able...
15
2144
by: dn | last post by:
I'm starting an n-tier application with an ASP.NET 2.0 presentation layer, a business layer, a data access layer, and a SQL Server 2005 database, and I have a question. In the business and data...
1
3203
by: Dan Holmes | last post by:
Assembly a = Assembly.LoadFrom(@"c:\sandbox\iaf.net\serverinstall\IVS.WMS.Category.Server.dll"); Type t = a.GetTypes(); The GetTypes fails with this message: "System.TypeLoadException: Could...
5
6798
by: Dan Holmes | last post by:
i have two classes that throw when GetTypes() is executed. The following are their signatures. public sealed class ProductService : IAF.TransactionComponent, IProductService public sealed...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7110
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
7314
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7030
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7482
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
5623
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,...
1
5041
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
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1540
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.