You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System.Reflection/Assembly.xml
+3-9Lines changed: 3 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1615,11 +1615,8 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex
1615
1615
<returns>An array that represents the types defined in this assembly that are visible outside the assembly.</returns>
1616
1616
<remarks>
1617
1617
<format type="text/markdown"><![CDATA[
1618
-
1619
1618
## Remarks
1620
-
The only types visible outside an assembly are public types and public types nested within other public types.
1621
-
1622
-
1619
+
The only types visible outside an assembly are public types and public types nested within other public types. To retrieve all types within an assembly, including those that are non-public, use the <xref:System.Reflection.Assembly.GetTypes%2A> method.
1623
1620
1624
1621
## Examples
1625
1622
The following code sample defines a number of classes with various access levels, and calls <xref:System.Reflection.Assembly.GetExportedTypes%2A> to display the ones that are visible from outside the assembly.
@@ -3313,13 +3310,12 @@ Note: In <see href="https://go.microsoft.com/fwlink/?LinkID=247912">.NET for Win
3313
3310
</ReturnValue>
3314
3311
<Parameters />
3315
3312
<Docs>
3316
-
<summary>Gets the types defined in this assembly.</summary>
3313
+
<summary>Gets all types defined in this assembly.</summary>
3317
3314
<returns>An array that contains all the types that are defined in this assembly.</returns>
3318
3315
<remarks>
3319
3316
<format type="text/markdown"><![CDATA[
3320
-
3321
3317
## Remarks
3322
-
The returned array includes nested types.
3318
+
The returned array includes nested and non-public types. To retrieve only public types, use the <xref:System.Reflection.Assembly.GetExportedTypes%2A> method.
3323
3319
3324
3320
If the <xref:System.Reflection.Assembly.GetTypes%2A> method is called on an assembly and a type in that assembly is dependent on a type in an assembly that has not been loaded (for example, if it derives from a type in the second assembly), a <xref:System.Reflection.ReflectionTypeLoadException> is thrown. For example, this can happen if the first assembly was loaded with the <xref:System.Reflection.Assembly.ReflectionOnlyLoad%2A> or <xref:System.Reflection.Assembly.ReflectionOnlyLoadFrom%2A> methods, and the second assembly was not loaded. It can also happen with assemblies loaded using the <xref:System.Reflection.Assembly.Load%2A> and <xref:System.Reflection.Assembly.LoadFile%2A> methods if the second assembly cannot be located when the <xref:System.Reflection.Assembly.GetTypes%2A> method is called.
3325
3321
@@ -3328,8 +3324,6 @@ Note: In <see href="https://go.microsoft.com/fwlink/?LinkID=247912">.NET for Win
3328
3324
3329
3325
To retrieve a collection of <xref:System.Reflection.TypeInfo> objects instead of an array of <xref:System.Type> objects, use the <xref:System.Reflection.Assembly.DefinedTypes%2A?displayProperty=nameWithType> property.
3330
3326
3331
-
3332
-
3333
3327
## Examples
3334
3328
The following example displays parameters of one method on a type in the specified assembly.
0 commit comments