Method GetLocationSafe
GetLocationSafe(Assembly?)
Safely retrieves the location of the specified assembly. This method catches all exception raised by Location.
public static string? GetLocationSafe(Assembly? assembly)
Parameters
assembly
AssemblyThe assembly whose location is to be retrieved.
Returns
- string
The location of the assembly as a string, or
null
if the location cannot be determined.