Method GetTypesSafe
GetTypesSafe(Assembly?, bool)
Returns the types defined in the specified assembly, optionally including only the exported types.
public static Type[] GetTypesSafe(Assembly? asm, bool onlyExported)
Parameters
asmAssemblyThe assembly from which to retrieve types. Can be null.
onlyExportedbooltrue to return only types that are exported from the assembly; otherwise, false to return all types.
Returns
- Type[]
An array of Type objects representing the types defined in the assembly. Returns an empty array if the assembly is null or contains no matching types.
GetTypesSafe(Assembly?)
Safely retrieves all types defined in the specified assembly.
public static Type[] GetTypesSafe(Assembly? asm)
Parameters
asmAssemblyThe assembly to retrieve types from.