Assembly: mscorlib (in mscorlib.dll)
public static bool ReferenceMatchesDefinition ( AssemblyName reference, AssemblyName definition )
public static boolean ReferenceMatchesDefinition ( AssemblyName reference, AssemblyName definition )
public static function ReferenceMatchesDefinition ( reference : AssemblyName, definition : AssemblyName ) : boolean
The reference assembly name.
The assembly name that is compared to the reference assembly.
Return Valuetrue if the loader resolves definition to the same assembly as reference; otherwise, false.
Both reference and definition are resolved by the loader, including policy evaluation, and then definition is tested for equality to reference.
The order of comparison is important, because the method tests whether the loader will accept definition to satisfy a load request for reference. Such mappings are not necessarily two-way.
For example, you might compare "MyAssembly, Version=220.127.116.11, Culture=neutral, PublicKeyToken=null" with "MyAssembly, Version=18.104.22.168, Culture=neutral, PublicKeyToken=null".
If the handler for the AssemblyResolve event has a reference display name, it can pass the display name of an available assembly as the definition parameter, to see if the available assembly would satisfy the load request. If so, the handler can return the available assembly.
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.