473,602 Members | 2,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The difference between GetTypes() and GetExportedType s() 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
GetExportedType s() 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 GetExportedType s() 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 4310
Abdessamad,

See inline:

"Abdessamad Belangour" <be*******@irin .univ-nantes.fr> wrote in message
news:eX******** ******@TK2MSFTN GP12.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
GetExportedType s() 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 GetExportedType s() 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.co m
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
6942
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 guess I'll try to narrow it down to a few specific questions, but any further input offered on the subject is greatly appreciated: 1. Are all of my class's methods supposed to take 'self' as their first arg? 2. Am I then supposed to call...
0
1595
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 create an instance of the class, it does'nt work. The call to createInstance leaves my instance to nothing. I also tried to load the types using getTypes and the I get an ReflectionLoadTypeExcetion : Unable to load one or more types in the...
2
1807
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. system.Reflexion.Assembly.LoadFrom(sFile).GetTypes was working fine until today where I get an error saying that all type in assembly cannot be loaded.
8
13292
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 that is being hidden in the base class. In VB.NET, the shadows keyword hides all the inherited functions, regardless of signature. I need this functionality in C#.
1
15304
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 Assembly.CreateInstance to create an object that implements an interface it cannot cast to the appropriate interface type before returning. e.g. ISubmit lo_MessagingObject=null; string
33
3455
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 to re-generate the classes on level 2 I have a 3rd level that inherits from them and implements specific hand coded methods. 4. My colleague asked me to create a 4th level class that inherits the 3rd level class so he can write custom...
15
2151
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 access layers, should I use static methods? Or, should I code the classes so that they have to be instantiated? I've seen examples of both, and I'm not sure which is the "preferred" or "best" way. Thanks.
1
3208
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 not load type 'IVS.WMS.Product.ICategoryService' from assembly 'IVS.WMS.Category.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'."
5
6802
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 class CategoryService : IAF.Configuration.ConfigurableComponent, ICategoryService This assembly references the assembly where the interfaces are defined.
0
7993
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7920
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8404
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8054
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8268
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6730
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5867
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3944
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1254
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.